On 01/08/13 14:01, Nikos Alexandris wrote:
Moritz:
r.rescale is just a frontend to r.reclass. and as such is meant for
CELLmaps. It should'nt make a difference whether it is 8-bit or more,
though. For DCELL you can try to use r.recode.
Nikos:
Didn't work also (tried the previous days) -- I can try again.
Moritz:
Please be more precise than "didn't work"...
Nikos:
Right, "be more precise" is the key to "freedom" :D. Indeed, I used to
say (either in a "rules" file, or directly using "...<< EOF"
[..]
I altered the rules file like
0.001:1.0:0:255
This works-out! Now, the recoded image is
r.recode in=Red_ToAR out=Red_ToAR_recoded_255 rules=recode_rules --o
r.stats Red_ToAR_recoded_255
100%
5
6
7
.
..
... \
....> Many values in-between
... /
..
.
195
196
197
*
And the histogram looks "nice" as well. I didn't grasp that -- from
where
should I? In the manual there is only an example from int to float
(however, indeed, instructing 0.1 as the "target" min value).
Moritz:
There does seem to be a bug in r.recode. Your first rule set should work
if you set the -d flag. Maybe you can file a ticket ?
Nikos:
Oh man... I need to rest. The "-d" flag... that's it :-p
On the other hand, even if I would read it (because I did not read carefully
the --help before), it reads:
-d Force output to 'double' raster map type (DCELL)
In this case I have a DCELL Input, recoding in to CELL Output. How is this
related?
Sorry, you're right. Got mixed up with another problem I had when I
tried to recode a 0:2047 image to 0.0:1.0. And even if -d solved my
problem there AFAICT it shouldn't be necessary.
Trying to do too many things at the same time in the last hours before
leaving on vacation !!
Moritz
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev