[GRASS-user] r.rescale error
glynn at gclements.plus.com
Wed Mar 9 16:43:43 EST 2011
Ned Horning wrote:
> I am trying to run r.rescale to apply a contrast stretch to an image to
> allow me to more easily locate ground control points using Georectify.
> When I run the following command:
> r.rescale input=Quickbird.blue at PERMANENT from=48,106
> output=Quickbird.blue.scale to=0,255
> I get the following error:
> Rescale Quickbird.blue at PERMANENT[48,106] to Quickbird.blue.scale[0,255]
> ERROR: Required parameter <rules> not set:
> (File containing reclass rules).
> Reclassify raster map based on category values.
> Creates a new raster map whose category values are based
> upon a reclassification of the categories in an existing
> raster map.
> I would expect the reclass rules to be provided by r.rescale but maybe
> I'm missing something. Is this a user problem or a bug?
It's a bug. The rules= parameter became mandatory some time prior to
the release of 6.4.0, but r.rescale wasn't updated accordingly. In
6.5, rules= is optional; in 7.0, r.rescale passes rules=- to
However, if you just want to change the visual appearance, r.rescale
probably isn't the right tool. I'd suggest using r.colors to change
the colour table, e.g.:
$ r.colors Quickbird.blue rules=- <<EOF
If the actual range of the raster is 48-106, you can just use
"r.colors ... color=grey"; most pre-defined rules map to the range of
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user