[GRASS-user] create a common colour scale

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 | m. +61 467 769 364 | Chair International Union of Soil Science Working Group on Proximal Soil Sensing | www.researcherid.com/rid/B-4061-2011 | scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ

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@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 | m. +61 467 769 364 | Chair International Union of Soil Science Working Group on Proximal Soil Sensing | www.researcherid.com/rid/B-4061-2011 | scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

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@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


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Tue, Jul 22, 2014 at 10:01 PM, <Raphael.Viscarra-Rossel@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 | m. +61 467 769 364 | Chair International Union of Soil Science Working Group on Proximal Soil Sensing | www.researcherid.com/rid/B-4061-2011 | scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

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.

···

On Tue, Jul 22, 2014 at 9:41 PM, Daniel Victoria <daniel.victoria@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


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Tue, Jul 22, 2014 at 10:01 PM, <Raphael.Viscarra-Rossel@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 | m. +61 467 769 364 | Chair International Union of Soil Science Working Group on Proximal Soil Sensing | www.researcherid.com/rid/B-4061-2011 | scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Tue, Jul 22, 2014 at 10:46 PM, <Raphael.Viscarra-Rossel@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.

Look at range option. You have to know the min/max values though. I am not
sure what's the best option in grass64. r.series would work but it creates
maps which is unnecessary.

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

I would recommend that.

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 | m. +61
467 769 364 | Chair International Union of Soil Science Working Group on
Proximal Soil Sensing | www.researcherid.com/rid/B-4061-2011 |
scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ

  From: Anna Petrášová <kratochanna@gmail.com>
Date: Wednesday, 23 July 2014 12:15 pm
To: Daniel Victoria <daniel.victoria@gmail.com>
Cc: "Viscarra Rossel, Raphael (L&W, Black Mountain)" <
Raphael.Viscarra-Rossel@csiro.au>, grass <grass-user@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@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@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 |
m. +61 467 769 364 | Chair International Union of Soil Science Working
Group on Proximal Soil Sensing | www.researcherid.com/rid/B-4061-2011 |
scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hello,

I downloaded grass 7.0(beta) from http://grass.osgeo.org/download/software/mac-osx/ and all the framework packages too.

Installed them but I cannot get the grass7 guy to run. Errors are below.

Launching GUI in the background, please wait…

GRASS 7.0.0svn (Meander):~ >

GRASS 7.0.0svn (Meander):~ > Unable to import pyGRASS: dlopen(/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/lib/libgrass_raster.7.0.0svn.dylib, 10): Symbol not found: _GEOSDelaunayTriangulation

Referenced from: /Library/Frameworks/SQLite3.framework/Versions/B/SQLite3

Expected in: /Library/Frameworks/GEOS.framework/Versions/3/GEOS

in /Library/Frameworks/SQLite3.framework/Versions/B/SQLite3

Some functionality will be not accessible

Traceback (most recent call last):

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/wxgui.py”, line 34, in

from lmgr.frame import GMFrame

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/lmgr/frame.py”, line 50, in

from lmgr.layertree import LayerTree, LMIcons

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/lmgr/layertree.py”, line 37, in

from mapdisp.frame import MapFrame

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/mapdisp/frame.py”, line 35, in

from vdigit.toolbars import VDigitToolbar

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/vdigit/toolbars.py”, line 30, in

from iclass.digit import IClassVDigit

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/iclass/digit.py”, line 23, in

from vdigit.wxdisplay import DisplayDriver, TYPE_AREA

ImportError: cannot import name TYPE_AREA

I could not find resolution to this problem on the web. Has anyone come across this and overcome it?

Thank you

Raphael

Hi,

you need to install the GEOS framework as well or the version of it which had been used to prepare the GRASS binaries.

Markus

On Jul 23, 2014 7:01 AM, Raphael.Viscarra-Rossel@csiro.au wrote:

Hello,

I downloaded grass 7.0(beta) from http://grass.osgeo.org/download/software/mac-osx/ and all the framework packages too.

Installed them but I cannot get the grass7 guy to run. Errors are below.

Launching GUI in the background, please wait…

GRASS 7.0.0svn (Meander):~ >

GRASS 7.0.0svn (Meander):~ > Unable to import pyGRASS: dlopen(/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/lib/libgrass_raster.7.0.0svn.dylib, 10): Symbol not found: _GEOSDelaunayTriangulation

Referenced from: /Library/Frameworks/SQLite3.framework/Versions/B/SQLite3

Expected in: /Library/Frameworks/GEOS.framework/Versions/3/GEOS

in /Library/Frameworks/SQLite3.framework/Versions/B/SQLite3

Some functionality will be not accessible

Traceback (most recent call last):

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/wxgui.py”, line 34, in

from lmgr.frame import GMFrame

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/lmgr/frame.py”, line 50, in

from lmgr.layertree import LayerTree, LMIcons

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/lmgr/layertree.py”, line 37, in

from mapdisp.frame import MapFrame

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/mapdisp/frame.py”, line 35, in

from vdigit.toolbars import VDigitToolbar

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/vdigit/toolbars.py”, line 30, in

from iclass.digit import IClassVDigit

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/iclass/digit.py”, line 23, in

from vdigit.wxdisplay import DisplayDriver, TYPE_AREA

ImportError: cannot import name TYPE_AREA

I could not find resolution to this problem on the web. Has anyone come across this and overcome it?

Thank you

Raphael


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hello Markus,

Thank you for the response. That fixed that. Now, I have another message (below). The gui starts ok though and I can open a project and map set. However, when I add my raster map to display, it does not display at all. I can see the histogram of the data but not the map.
Is the message I get is this – related to the problem I am having?:

Launching GUI in the background, please wait…

GRASS 7.0.0svn (Aus1km):~ > objc[15362]: Class TSSandboxPrefs is implemented in both /Library/Frameworks/TSLicense.framework/Versions/A/TSLicense and /Library/QuickTime/Flip4Mac WMV Import.component/Contents/MacOS/Flip4Mac WMV Import. One of the two will be used. Which one is undefined.

objc[15362]: Class TSSandboxPrefs is implemented in both /Library/Frameworks/TSLicense.framework/Versions/A/TSLicense and /Library/QuickTime/Flip4Mac WMV Advanced.component/Contents/MacOS/Flip4Mac WMV Advanced. One of the two will be used. Which one is undefined.

GRASS 7.0.0svn (Aus1km):~ >

Thank you. Raphael.

From: Markus Neteler <neteler@osgeo.org>
Date: Wednesday, 23 July 2014 4:19 pm
To: “Viscarra Rossel, Raphael (L&W, Black Mountain)” <Raphael.Viscarra-Rossel@csiro.au>
Cc: “grass-user@lists.osgeo.org” <grass-user@lists.osgeo.org>
Subject: Re: [GRASS-user] problems with installation of grass 7

Hi,

you need to install the GEOS framework as well or the version of it which had been used to prepare the GRASS binaries.

Markus

On Jul 23, 2014 7:01 AM, <Raphael.Viscarra-Rossel@csiro.au> wrote:

Hello,

I downloaded grass 7.0(beta) from http://grass.osgeo.org/download/software/mac-osx/ and all the framework packages too.

Installed them but I cannot get the grass7 guy to run. Errors are below.

Launching GUI in the background, please wait…

GRASS 7.0.0svn (Meander):~ >

GRASS 7.0.0svn (Meander):~ > Unable to import pyGRASS: dlopen(/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/lib/libgrass_raster.7.0.0svn.dylib, 10): Symbol not found: _GEOSDelaunayTriangulation

Referenced from: /Library/Frameworks/SQLite3.framework/Versions/B/SQLite3

Expected in: /Library/Frameworks/GEOS.framework/Versions/3/GEOS

in /Library/Frameworks/SQLite3.framework/Versions/B/SQLite3

Some functionality will be not accessible

Traceback (most recent call last):

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/wxgui.py”, line 34, in

from lmgr.frame import GMFrame

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/lmgr/frame.py”, line 50, in

from lmgr.layertree import LayerTree, LMIcons

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/lmgr/layertree.py”, line 37, in

from mapdisp.frame import MapFrame

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/mapdisp/frame.py”, line 35, in

from vdigit.toolbars import VDigitToolbar

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/vdigit/toolbars.py”, line 30, in

from iclass.digit import IClassVDigit

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/iclass/digit.py”, line 23, in

from vdigit.wxdisplay import DisplayDriver, TYPE_AREA

ImportError: cannot import name TYPE_AREA

I could not find resolution to this problem on the web. Has anyone come across this and overcome it?

Thank you

Raphael


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

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 -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

  1. 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@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 | m. +61 467 769 364 | Chair International Union of Soil Science Working Group on Proximal Soil Sensing | www.researcherid.com/rid/B-4061-2011 | scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ

From: Anna Petrášová <kratochanna@gmail.com>
Date: Wednesday, 23 July 2014 12:15 pm
To: Daniel Victoria <daniel.victoria@gmail.com>
Cc: “Viscarra Rossel, Raphael (L&W, Black Mountain)” <Raphael.Viscarra-Rossel@csiro.au>, grass <grass-user@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@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


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Tue, Jul 22, 2014 at 10:01 PM, <Raphael.Viscarra-Rossel@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 | m. +61 467 769 364 | Chair International Union of Soil Science Working Group on Proximal Soil Sensing | www.researcherid.com/rid/B-4061-2011 | scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

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.

···

On Tue, Jul 22, 2014 at 11:46 PM, <Raphael.Viscarra-Rossel@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 | m. +61 467 769 364 | Chair International Union of Soil Science Working Group on Proximal Soil Sensing | www.researcherid.com/rid/B-4061-2011 | scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ

From: Anna Petrášová <kratochanna@gmail.com>
Date: Wednesday, 23 July 2014 12:15 pm
To: Daniel Victoria <daniel.victoria@gmail.com>
Cc: “Viscarra Rossel, Raphael (L&W, Black Mountain)” <Raphael.Viscarra-Rossel@csiro.au>, grass <grass-user@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@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


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Tue, Jul 22, 2014 at 10:01 PM, <Raphael.Viscarra-Rossel@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 | m. +61 467 769 364 | Chair International Union of Soil Science Working Group on Proximal Soil Sensing | www.researcherid.com/rid/B-4061-2011 | scholar.google.com.au/citations?hl=en&user=KpJdvKEAAAAJ


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hello,

I have installed GRASS 7 (thank you Markus for the hint to install GEOS frwk also) – GRASS7 and the GUI start and all seems fine until I try to display a raster map – it does not display.

I thought that it might be because the mapset was created in an older version of GRASS (6.4.2) but I started a new project and imported a raster into a new mapset – still not displaying. I can draw a histogram of the raster data but I cannot view the map.

I am use a Mac and I wonder if anyone using a Mac has encountered the same problem? And if they could overcome it?

When I start GRASS7, I get the message below, but I do not know what it means. Could it be related to the display problem?

Will appreciate any help with this. Thank you.

Raphael.

Launching GUI in the background, please wait…

GRASS 7.0.0svn (Aus1km):~ > objc[15362]: Class TSSandboxPrefs is implemented in both /Library/Frameworks/TSLicense.framework/Versions/A/TSLicense and /Library/QuickTime/Flip4Mac WMV Import.component/Contents/MacOS/Flip4Mac WMV Import. One of the two will be used. Which one is undefined.

objc[15362]: Class TSSandboxPrefs is implemented in both /Library/Frameworks/TSLicense.framework/Versions/A/TSLicense and /Library/QuickTime/Flip4Mac WMV Advanced.component/Contents/MacOS/Flip4Mac WMV Advanced. One of the two will be used. Which one is undefined.

GRASS 7.0.0svn (Aus1km):~ >

From: Markus Neteler <neteler@osgeo.org>
Date: Wednesday, 23 July 2014 4:19 pm
To: “Viscarra Rossel, Raphael (L&W, Black Mountain)” <Raphael.Viscarra-Rossel@csiro.au>
Cc: “grass-user@lists.osgeo.org” <grass-user@lists.osgeo.org>
Subject: Re: [GRASS-user] problems with installation of grass 7

Hi,

you need to install the GEOS framework as well or the version of it which had been used to prepare the GRASS binaries.

Markus

On Jul 23, 2014 7:01 AM, <Raphael.Viscarra-Rossel@csiro.au> wrote:

Hello,

I downloaded grass 7.0(beta) from http://grass.osgeo.org/download/software/mac-osx/ and all the framework packages too.

Installed them but I cannot get the grass7 guy to run. Errors are below.

Launching GUI in the background, please wait…

GRASS 7.0.0svn (Meander):~ >

GRASS 7.0.0svn (Meander):~ > Unable to import pyGRASS: dlopen(/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/lib/libgrass_raster.7.0.0svn.dylib, 10): Symbol not found: _GEOSDelaunayTriangulation

Referenced from: /Library/Frameworks/SQLite3.framework/Versions/B/SQLite3

Expected in: /Library/Frameworks/GEOS.framework/Versions/3/GEOS

in /Library/Frameworks/SQLite3.framework/Versions/B/SQLite3

Some functionality will be not accessible

Traceback (most recent call last):

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/wxgui.py”, line 34, in

from lmgr.frame import GMFrame

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/lmgr/frame.py”, line 50, in

from lmgr.layertree import LayerTree, LMIcons

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/lmgr/layertree.py”, line 37, in

from mapdisp.frame import MapFrame

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/mapdisp/frame.py”, line 35, in

from vdigit.toolbars import VDigitToolbar

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/vdigit/toolbars.py”, line 30, in

from iclass.digit import IClassVDigit

File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/gui/wxpython/iclass/digit.py”, line 23, in

from vdigit.wxdisplay import DisplayDriver, TYPE_AREA

ImportError: cannot import name TYPE_AREA

I could not find resolution to this problem on the web. Has anyone come across this and overcome it?

Thank you

Raphael


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Raphael wrote:

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.

For only 6 maps I wouldn't bother with scripting a mix,max variable,
just run r.info in a loop and copy out the min,max by hand.

for MAP in `g.mlist rast pattern=rain*` ; do
   r.info -r $MAP
done

then make a dummy map with r.mapcalc with overall min and max range.

min=1.2345
max=9.8765
r.mapcalc "color_map = if(row < 10, $min, $max)"

and then apply it with:

for MAP in `g.mlist rast pattern=rain*` ; do
   r.colors $MAP rast=color_map
done

Or run r.colors with the rules= option to set up some color rules
by hand, then apply to all in a loop.

But what I usually do these days in GRASS 6 is to use the r.stack
addon module to temporarily consider all the maps together, which
allows for the nice 'r.colors -e' equalized histogram color scaling.
You can copy the color map to a small dummy raster with the r.colors
rast= option then delete the stacked raster map if you want to save
space, then apply it to all maps as in the Bourne shell loop above.

regards,
Hamish

Hello Hamish,
thank you for the response and the hints.
They are very useful as i cannot get GRASS7 to work.
Best wishes,
Raphael.

On 29 Jul 2014, at 2:52 pm, Hamish <hamish.webmail@gmail.com> wrote:

Raphael wrote:

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.

For only 6 maps I wouldn't bother with scripting a mix,max variable,
just run r.info in a loop and copy out the min,max by hand.

for MAP in `g.mlist rast pattern=rain*` ; do
  r.info -r $MAP
done

then make a dummy map with r.mapcalc with overall min and max range.

min=1.2345
max=9.8765
r.mapcalc "color_map = if(row < 10, $min, $max)"

and then apply it with:

for MAP in `g.mlist rast pattern=rain*` ; do
  r.colors $MAP rast=color_map
done

Or run r.colors with the rules= option to set up some color rules
by hand, then apply to all in a loop.

But what I usually do these days in GRASS 6 is to use the r.stack
addon module to temporarily consider all the maps together, which
allows for the nice 'r.colors -e' equalized histogram color scaling.
You can copy the color map to a small dummy raster with the r.colors
rast= option then delete the stacked raster map if you want to save
space, then apply it to all maps as in the Bourne shell loop above.

regards,
Hamish

Raphael wrote:

thank you for the response and the hints.

no worries

They are very useful as i cannot get GRASS7 to work.

what's the trouble? maybe we can help.

regards,
Hamish

Hello Hamish,

I installed GRASS 7 (following Markus’ hint to install GEOS frwk also).
GRASS7 and the GUI start and all seems fine until I try to display a raster map – it does not display.

I thought that it might be because the mapset was created in an older version of GRASS (6.4.2) but I started a new project and imported a raster into a new map set in G7 – still not displaying. I can draw a histogram of the raster data but I cannot view the map.

When I start GRASS7, I get the message below, but I do not know what it means.

I use a Mac. Will appreciate any help with this. Thank you.

Launching GUI in the background, please wait…

GRASS 7.0.0svn (rain):~ > objc[15362]: Class TSSandboxPrefs is implemented in both /Library/Frameworks/TSLicense.framework/Versions/A/TSLicense and /Library/QuickTime/Flip4Mac WMV Import.component/Contents/MacOS/Flip4Mac WMV Import. One of the two will be used. Which one is undefined.

objc[15362]: Class TSSandboxPrefs is implemented in both /Library/Frameworks/TSLicense.framework/Versions/A/TSLicense and /Library/QuickTime/Flip4Mac WMV Advanced.component/Contents/MacOS/Flip4Mac WMV Advanced. One of the two will be used. Which one is undefined.

GRASS 7.0.0svn (rain):~ >

Raphael.

From: Hamish <hamish.webmail@gmail.com>
Date: Wednesday, 30 July 2014 5:09 pm
To: “Viscarra Rossel, Raphael (L&W, Black Mountain)” <Raphael.Viscarra-Rossel@csiro.au>
Cc: “grass-user@lists.osgeo.org” <grass-user@lists.osgeo.org>
Subject: Re: [GRASS-user] create a common colour scale

Raphael wrote:

thank you for the response and the hints.

no worries

They are very useful as i cannot get GRASS7 to work.

what’s the trouble? maybe we can help.

regards,
Hamish