[GRASS5] [bug #4331] (grass) delete if file exist - flag

Glynn Clements glynn at gclements.plus.com
Tue Apr 25 09:26:45 EDT 2006

Request Tracker wrote:

> BTW the delete file handling is not consistent (but I think that has been 
> discussed earlier) r.mapcalc is just overwriting the file but e.g. r.rescale 
> does prompt an error message that the file exist.

The libgis functions G_open_cell_new() etc will overwrite an existing
map without complaining. However, G_parser() will generate an error if
an option's gisprompt setting indicates a new map and the map already

In general, modules which use G_parser() won't allow overwriting
existing maps, while those which don't use it will allow it. Changing
r.mapcalc to use G_parser() isn't really an option, as that would
break all of the existing scripts which use it.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list