[GRASS-dev] interferring ovewrite flags [was: [bug #5167] (grass) v.patch: -a(ppend) issues]

Michael Barton michael.barton at asu.edu
Sun Oct 1 22:24:22 EDT 2006


This is interesting.

I don't *think* that r.reclass will work additively because it just makes a
new copy of the tables in cellhd and cats for the same map. I've never
noticed it when making masks.

But I haven't tested it for this specific "feature".

How can you make a mask additive with r.mapcalc? This could be useful
sometime.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton



> From: Hamish <hamish_nospam at yahoo.com>
> Date: Mon, 2 Oct 2006 15:08:49 +1300
> To: Michael Barton <michael.barton at asu.edu>
> Cc: <tutey at o2.pl>, <grass-dev at grass.itc.it>
> Subject: Re: [GRASS-dev] interferring ovewrite flags [was: [bug #5167] (grass)
> v.patch: -a(ppend) issues]
> 
> Michael Barton wrote:
>> 
>> Is having both -o and --o a problem?
>> 
>> The reason I ask is that --o, by design, doesn't show up in the
>> module/script GUI. For r.mask, much of the time, the user will simply
>> want to overwrite the existing MASK file, to avoid the annoyance of
>> having to run g.remove each time (note the MASK file created by r.mask
>> is a reclass of a real raster file, so there is little loss if it is
>> deleted).
>> 
>> So in this case, I'd prefer to have an overwrite option easily
>> accessible to a user. How best to do this?
> 
> 
> be careful with using r.mask or r.mapcalc to overwrite a MASK. If the
> old mask is still present when the new one is created, it will be an
> additive replacement, not a full replacement. This can be very useful
> for "building up" a MASK map, but also cause lots of problems if you
> aren't expecting it.
> 
> I'm not exactly sure how r.reclass works (thus r.mask script too), but
> it will work like this if it reads raster data row by row.
> 
> 
> Hamish




More information about the grass-dev mailing list