[GRASS5] [bug #1066] (grass) strange r.reclass warning

Glynn Clements glynn.clements at virgin.net
Wed May 29 18:00:56 EDT 2002


Bernhard Reiter wrote:

> >  > No. It is important to warn.
> > 
> > If nothing bad is going to happen, then why is it a WARNING?  Why not
> > word it as a Note instead?
> 
> Good question: I was under the impression that it will have some 
> consequences. If it doesn't why attempting that operation? :)

A brief explanation of reclassed_to:

When creating a reclass map, G_put_reclass() attempts to append the
details of the resulting map to the *source* map's "reclassed_to"
file. This allows programs to discover whether a given map has any
reclass maps based upon it, via G_is_reclassed_to().

The main user of G_is_reclassed_to() is g.remove, which refuses to
remove a map if it is known to be the base map for any existing
reclass maps.

The warning occurred if the base map's reclassed_to file cannot be
updated (due to the lack of write permission). The only consequence of
this is that the base map wouldn't have any record of the reclass map,
so it could be removed while the reclass map existed, rendering the
reclass map useless.

A brief history of reclassed_to:

1. It wasn't present in GRASS 4.3.

2. It was present in the 2001/02/26 GRASS 5 CVS snapshot (the first
version of GRASS 5 which I tried) but, at that time, failure to update
the reclassed_to file caused r.reclass to fail. So, a "normal" user
typically couldn't generate a reclass of a map in the PERMANENT
mapset.

3. Around March 2001, I ran into this problem, and reported it as a
bug (#229). Once I had CVS commit access, I changed G_put_reclass() to
generate a warning but to indicate success.

4. Following Markus' recent comments, I disabled the warning, as:

a) the issue doesn't have a simple explanation,

b) even if the user understands the issue, they probably can't do much
about it (apart from taking their own copy of the base map, so that
they will have write permission; but this probably shouldn't be
encouraged).

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list