[GRASS-user] Using temp files in Grass Script

Greetings

I’m doing a GRASS script and I have some intermediate processes (e.gr.mapcalc) where I produce raster maps that are not the final product (a kind of an intermediate product) and that i delete at the end. Since I have to produce a lot my question is:
Shall I use tempfile function to create and produce them or I shall create these rasters as normal raster files?

Thanks
Monica

Monica Buescu wrote:

I'm doing a GRASS script and I have some intermediate processes
(e.gr.mapcalc) where I produce raster maps that are not the final product (a
kind of an intermediate product) and that i delete at the end. Since I have
to produce a lot my question is:
Shall I use tempfile function to create and produce them or I shall create
these rasters as normal raster files?

g.tempfile creates files, not maps.

The usual convention for temporary map names is to include the name of
the script, "tmp", and the PID (use $$ for shell scripts, os.getpid()
for Python).

--
Glynn Clements <glynn@gclements.plus.com>

Hi,

2011/3/16 Glynn Clements <glynn@gclements.plus.com>:

g.tempfile creates files, not maps.

The usual convention for temporary map names is to include the name of
the script, "tmp", and the PID (use $$ for shell scripts, os.getpid()
for Python).

maybe we could define new grass.tempmap() function for that...

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa