[GRASS-user] r.colors generates different colors than QGIS plugin when same rules used?

Tim Holland timothyholland at gmail.com
Wed Sep 2 01:49:20 EDT 2009


Thanks both for the help, Glynn and Hamish.  

Setting GRASS_TRUECOLOR to TRUE did it.  Once that was changed, the colors
came out identical to the QGIS display.  Which I'm very happy about!

The file was originally FCELL, so I also tried switching it to CELL.  This
didn't make a change to the color scaling that I could see, although I was
looking at it on files aggregated at the level of provinces (in Laos), so if
there was a subtle change in color smoothing I likely would not have seen
it.  

Hamish, regarding your question about QGIS importing GRASS color tables -
I'm afraid I don't know what GMT .cpt files are, so can't respond to that
part, but it does successfully import GRASS color tables as long as the cell
values are all non-negative.  When there are negative values, that seems to
break down, and it only gives colors for the positive values, leaving the
negatives as white (so in my case, it worked well for maps of '% forest
cover', but did not work for maps of '% change in forest cover').  I had
less luck getting QGIS to use GRASS color tables for vectors, but I didn't
follow that up very far.  

Thanks again for the help!
Tim




Glynn Clements wrote:
> 
> 
> Tim Holland wrote:
> 
>> I am trying to generate PNG files of a few different maps using r.colors,
>> d.rast, and the PNG driver.  
>> 
>> The images I get from this process end up being colored slightly
>> differently
>> than when the equivalent images are generated in QGIS.  It is far more
>> convenient to use the PNG driver right in GRASS (because I can set a
>> script
>> running and print out many images at once), but I prefer the color
>> results I
>> get with QGIS.  
> 
> Does it help if you do:
> 
> 	export GRASS_TRUECOLOR=TRUE
> 
> before starting the PNG driver?
> 
> The PNG driver defaults to generating 256-colour images, using a fixed
> 6x6x6 colour-cube.
> 
> -- 
> Glynn Clements <glynn at gclements.plus.com>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
> 
> 

-- 
View this message in context: http://n2.nabble.com/r-colors-generates-different-colors-than-QGIS-plugin-when-same-rules-used-tp3558680p3564911.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list