[GRASS5] Re: [GRASSLIST:4564] Re: .tmp files
Glynn Clements
glynn.clements at virgin.net
Thu Sep 26 04:53:05 EDT 2002
Glynn Clements wrote:
> > If you kill v.to.rast with CTRL-C, these temp files remain until
> > you leave GRASS. The local README says that G_tempfile() is not used
> > (which grep confirms).
>
> Well, src/mapdev/v.to.rast/README says:
>
> (1) It does not use a temporary file. Results go directly to the raster map.
> It does this by making one or more passes thru the vector map,
> rasterizing only a fixed number of rows (in memory, default 512),
> writing these rows to the raster map, and then repeating for the
> next set of rows, etc;
>
> However, G__open_raster_new() creates temporary files for the data and
> null rasters. However, G_close_cell(), G_unopen_cell() etc should move
> these into the correct locations.
>
> This indicates the location of the temporary directories; they have to
> be on the same filesystem as the mapset directory.
>
> In light of what's in the README, it may be that it's opening the
> output more times than it's closing it.
No; sorry, I overlooked the "If you kill v.to.rast with CTRL-C" part.
ANY program which creates raster maps will leave temporary files
behind if you kill it between e.g. G_open_cell_new() and e.g.
G_close_cell().
There might be enough information in the libgis structures (i.e. the
temp_name and null_temp_name fields of G__.fileinfo[fd]) that this
could be handled by a generic signal handler.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list