[GRASS5] The status of 5.0

Glynn Clements glynn.clements at virgin.net
Wed Mar 27 12:57:25 EST 2002


Markus Neteler wrote:

> > Also, reclass.c has specific code (re_reclass()) to generate a reclass
> > of reclass. However, main.c explicitly checks for this case and
> > generates a fatal error if you try to use it. This limitation wasn't
> > in 4.3; it was introduced in:
> > 
> > 	revision 1.3
> > 	date: 2001/02/07 10:33:07;  author: markus;  state: Exp;  lines: +8 -0
> > 	added check if input map is already a reclass (currently not allowed)
> > 
> > Markus: do you recall the reasoning behind this?
> 
> Well, that time the "reclass of reclass" didn't seem to work. If yes,
> the check should definitly be removed to enable again reclasses of reclass.

While looking into this, I encountered what appears to be incorrect
behaviour regarding the handling of categories when using a
default-to-self rule (this applies to reclassing non-reclass maps):

	GRASS:~ > r.reclass in=soils out=foo           
	
	Enter the rule or 'help' for the format description:
	> 2=1 cat1
	> 4=2 cat2
	> *=*
	> end
	GRASS:~ > r.cats foo | head
	Reading foo in glynn ... 100%
	1       Aab
	2       cat2
	3       Bb
	5       BcC
	6       BeE
	7       Bhe
	8       Bkd
	9       CBE
	10      CaD
	11      CaE
	GRASS:~ > 

Category #1 retains its old label, even though it appears on the RHS
of a rule. Basically, category labels are retained when the category
doesn't appear on the LHS; I would have thought that it should be the
RHS which is checked.

Can someone confirm that this is a bug?

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



More information about the grass-dev mailing list