[GRASS5] r.rescale range question

Hi,

while looking at r.rescale I found

r.rescale [-q] input=name [from=min,max] output=name [to=min,max]
   [title="phrase"]

[...]
      to The output data range
           default: 1,255

This range looks a bit unusual. Shouldn't it be 8bit = 0..255?

Markus

Well, if you think about it in GRASS 4.3 terms, no, since
0 represents the absence of value (NULL). But in GRASS 5 I think
it should be 0..255, indeed
Bye
Andrea

Markus Neteler wrote:

Hi,

while looking at r.rescale I found

r.rescale [-q] input=name [from=min,max] output=name [to=min,max]
   [title="phrase"]

[...]
      to The output data range
           default: 1,255

This range looks a bit unusual. Shouldn't it be 8bit = 0..255?

Markus
_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

Markus Neteler wrote:

while looking at r.rescale I found

r.rescale [-q] input=name [from=min,max] output=name [to=min,max]
   [title="phrase"]

[...]
      to The output data range
           default: 1,255

This range looks a bit unusual. Shouldn't it be 8bit = 0..255?

I would guess that it's a leftover from when zero was null.

Personally, I would suggest just making the "to" option mandatory. I
can't see why 255 is any more suitable as a default than any other
value.

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

On Fri, Nov 09, 2001 at 02:39:36PM +0000, Glynn Clements wrote:

Markus Neteler wrote:

> while looking at r.rescale I found
>
> r.rescale [-q] input=name [from=min,max] output=name [to=min,max]
> [title="phrase"]
>
> [...]
> to The output data range
> default: 1,255
>
> This range looks a bit unusual. Shouldn't it be 8bit = 0..255?

I would guess that it's a leftover from when zero was null.

Personally, I would suggest just making the "to" option mandatory. I
can't see why 255 is any more suitable as a default than any other
value.

Thanks for all suggestions. I have updated module and html page
making the "to" option mandatory.

Cheers,

Markus

Hi,

Markus Neteler schrieb:

On Fri, Nov 09, 2001 at 02:39:36PM +0000, Glynn Clements wrote:
>
> Markus Neteler wrote:
>
> > while looking at r.rescale I found
> >
> > r.rescale [-q] input=name [from=min,max] output=name [to=min,max]
> > [title="phrase"]
> >
> > [...]
> > to The output data range
> > default: 1,255
> >
> > This range looks a bit unusual. Shouldn't it be 8bit = 0..255?
>
> I would guess that it's a leftover from when zero was null.
>
> Personally, I would suggest just making the "to" option mandatory. I
> can't see why 255 is any more suitable as a default than any other
> value.

Thanks for all suggestions. I have updated module and html page
making the "to" option mandatory.

But that is only true if we do not implement the -z flag which changes
to zero (0) for null values.
Please look in the RT and my other mails on the problems with r.reclass.
I am lost with the problem in r.reclass somehow. Would appreciate any
help with that.

cu,

Andreas
--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
url: http://mitglied.tripod.de/AndreasLange
mail: Andreas.Lange_at_Rhein-Main.de - A.C.Lange_at_GMX.net