[GRASSLIST:2199] Re: How to display satellite data correctly?

Glynn Clements glynn.clements at virgin.net
Mon Jan 12 16:57:36 EST 2004


Ian Macmillan wrote:

> I am not sure if there is an automated way to do this, perhaps a
> simple script could be written with r.mapcalc. Anybody know how to do
> this?
> 
> The manual way to do this is to use d.histogram to obtain the values
> at each end of the histogram. After that, use r.rescale to change each
> raster. For example,
> 
> d.erase blue
> #need the color to see the curve correctly
> d.histogram map=rast.b1
> r.rescale input=rast output=rast.b1x from=40,140 to=0,255
> #repeat this for the 3 bands, then
> d.rgb red=rast.b3x green=rast.b2x blue=rast.b1x

It would probably be better to just use "r.colors ... color=rules" to
change the intensity mapping; there isn't any need to change the
actual data values.

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




More information about the grass-user mailing list