Wed, May 2 2001
13:51:34
|
|
Request created by mneteler
|
|
Subject: r.rescale: -z flag wanted
r.rescale input=asp1 from=0,180 output=test_north to=1,1
r.rescale does not set cells outside the "from" range to 0 (described in the
help), but to NULL
(reported by timcera@earthlink.net)
Andreas Lange, 10/2000: This is IMHO not a bug, but a feature. All modules
should write NULL instead of 0 (zero) for missing values for patching
maps or display overlays.
But if the problem with r.reclass is solved i can add a "-z" flag that
switches this behaviour from writing NULL to writing "0" (zero).
(being worked on by Andreas Lange)
|
|
Fri, Nov 9 2001
01:22:24
|
|
Taken by alange
|
|
Fri, Nov 9 2001
13:55:44
|
|
Mail sent by bernhard
|
|
If the current documentation differs from the help documentation
this is at least a bug in the documentation, isn't it? |
|
Fri, Nov 9 2001
14:57:31
|
|
Mail sent by alange
|
|
I'll look into this.
I think the documentation should be updated when the module is updated.
r.rescale needs some work IMHO.
Andreas |
|
Fri, Nov 9 2001
16:37:12
|
|
Mail sent by alange
|
|
I have looked into this.
The problem is that r.rescale calls r.reclass.
But r.reclass does not work with a catch-all clause like this:
* = 0
It only works with the _last_ rule like this:
* = NULL
There is a commented code block in reclass.c which describes this.
If i do a reclass (e. g. on geology from spearfish) like this:
1 = 100
2 = 200
3 = 300
* = 9
all cells outside the range 1..3 are NULL.
The code in reclass.c exceeds my current capacity.
Perhaps someone else is able to fix r.reclass to work correctly.
Then the -z flag will be trivial to implement.
Andreas |
|
Fri, Jan 4 2002
18:05:40
|
|
Mail sent by mneteler
|
|
Hi Andreas,
is r.reclass changed already? May I ask you to test it
again (r.reclass was changed some time ago).
Thanks,
Markus
|
|
Fri, Jan 4 2002
18:06:34
|
|
User changed to neteler@itc.it by mneteler
|
|
Fri, Jan 4 2002
22:54:16
|
|
Mail sent by alange
|
|
The described problem still exists.
The catch-all rule:
*=0
does not work. All values not catched with an other reclass rule are still
reclassed to NULL, irrespectively of the '*'-rule.
I think that this is an inherent problem of the r.reclass parser.
Andreas |
|
Sun, Mar 24 2002
15:31:31
|
|
Mail sent by gclements
|
|
The problem was that the range of the reclass map is limited to the categories
which are listed explicitly in the rules. '*' only applied to undefined
categories within that range.
I have committed a fix for this.
|
|
Sun, Mar 24 2002
15:31:38
|
|
Status changed to resolved by gclements
|
|