[GRASS-user] create a common colour scale

Raphael.Viscarra-Rossel at csiro.au Raphael.Viscarra-Rossel at csiro.au
Wed Jul 23 06:15:27 PDT 2014


Thank you Daniel. I installed grass 7 but my rasters will not display. Strange. Will wait to see if others with macs have encountered this problem.
Until then your solution sounds good and will give it a gob tomorrow.

Best wishes,

Raphael.

Sent from my mobile device

On 23 Jul 2014, at 10:04 pm, "Daniel Victoria" <daniel.victoria at gmail.com<mailto:daniel.victoria at gmail.com>> wrote:

Hi Raphael,

I do recommend upgrading and going the way Anna mentioned, especially if you are dealing with a large number of maps. But if that is not an option here are the steps I'd take:

1) run r.info<http://r.info> -r on each map to get the min/max range
2) user r.colors with one of the maps and the rule option to set you color table to that map. Your rules might look something like this
min_value red
(max - min)/2 yellow
max_value blue
end
-- by substituting the min / max in the above you get a colortable going from red to blue with yellow in the middle
3) copy the color table you just set to the other maps using r.color rast option. Take a look at r.color man page for more info
http://grass.osgeo.org/grass64/manuals/r.colors.html

Daniel


On Tue, Jul 22, 2014 at 11:46 PM, <Raphael.Viscarra-Rossel at csiro.au<mailto:Raphael.Viscarra-Rossel at csiro.au>> wrote:
Thank you Daniel and Anna for the suggestions.
Daniel, I wonder how I might display the ‘common’ colour legend when visualising the maps?
When the maps are visualised, the colour legend changes to the min max of the current map displayed.

Anna, I use GRASS 6.4.2 – so I guess I should upgrade…

Thank you again.
Raphael.


__________________________
Raphael VISCARRA ROSSEL | Principal Research Scientist | CSIRO Land and Water | Bruce E. Butler Laboratory, Clunies Ross St, Black Mountain, Acton ACT 2601 | PO BOX 1666 Canberra ACT 2600 | t. +61 2 6246 5945<tel:%2B61%202%206246%205945> | m. +61 467 769 364<tel:%2B61%20467%20769%20364> | Chair International Union of Soil Science Working Group on Proximal Soil Sensing | www.researcherid.com/rid/B-4061-2011<http://www.researcherid.com/rid/B-4061-2011> | scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ<http://scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ>



From: Anna Petrášová <kratochanna at gmail.com<mailto:kratochanna at gmail.com>>
Date: Wednesday, 23 July 2014 12:15 pm
To: Daniel Victoria <daniel.victoria at gmail.com<mailto:daniel.victoria at gmail.com>>
Cc: "Viscarra Rossel, Raphael (L&W, Black Mountain)" <Raphael.Viscarra-Rossel at csiro.au<mailto:Raphael.Viscarra-Rossel at csiro.au>>, grass <grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>>
Subject: Re: [GRASS-user] create a common colour scale

Hi,

in case you use GRASS 7, r.colors accepts multiple maps or a file with the map names. So this should do it:
r.colors map=precip1,precip2,precip3 color=precipitation

Also, have a look at temporal modules (GRASS 7 only). You can register the series of maps as a dataset (t.create, t.register) and then you can easily get the min, max values for the entire series and there is also t.rast.colors.

Anna


On Tue, Jul 22, 2014 at 9:41 PM, Daniel Victoria <daniel.victoria at gmail.com<mailto:daniel.victoria at gmail.com>> wrote:
Hi Raphael,

This is what I did some time ago when I had the same problem
1) Find out the overall minimun and maximum precipitation over all maps.
2) Use r.colors with the rules option to compose a colortable that cover my entire precip range.
3) Apply the same colortable to all maps
4) plot and be happy

Hope it helps
Daniel


On Tue, Jul 22, 2014 at 10:01 PM, <Raphael.Viscarra-Rossel at csiro.au<mailto:Raphael.Viscarra-Rossel at csiro.au>> wrote:
Hello
I wonder if anyone knows how to create a common colour scale for different raster maps?
I want to display all six maps on the same page with the single colour scale but I cannot find how to do this in GRASS.

More specifically, I have six raster maps of rainfall for different time periods (each has a different range of values) and I would like to display them all with the same colour scale. The colour scale needs to be constructed using the min and max values of the set of six maps (and not just individual maps.

Will appreciate any input please. Thank you,

Raphael.

__________________________
Raphael VISCARRA ROSSEL | Principal Research Scientist | CSIRO Land and Water | Bruce E. Butler Laboratory, Clunies Ross St, Black Mountain, Acton ACT 2601 | PO BOX 1666 Canberra ACT 2600 | t. +61 2 6246 5945<tel:%2B61%202%206246%205945> | m. +61 467 769 364<tel:%2B61%20467%20769%20364> | Chair International Union of Soil Science Working Group on Proximal Soil Sensing | www.researcherid.com/rid/B-4061-2011<http://www.researcherid.com/rid/B-4061-2011> | scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ<http://scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ>



_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/grass-user


_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/grass-user


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20140723/7daeea22/attachment.html>


More information about the grass-user mailing list