Re: [GRASS-user] exploding a color table
Neil Best pisze: Has anyone come up with a way to convert a streched color table for a floating point map into a set of discrete colors? I am thinking especially of NDVI, so I would like to generate the list of 256 colors along the NDVI floating point stretch to use with the result of r.recode that I used to convert my NDVI map to an integer map. If I could properly set the color table for that new map then I could maintain the symbolization within GRASS rather than having to spew a list of 256 colors for a Mapserver configuration. Any thoughts? Glynn already answered with r.what.color, here is how to automate that: seq 255 | r.what.color -i mapname but I wonder, are you using the r.colors color=ndvi rules? they look like this: cat $GISBASE/etc/colors/ndvi -1. white -0.3000 blue -0.2000 205 193 173 0. 150 150 150 0.1000 120 100 51 0.3000 120 200 100 0.4000 28 144 3 0.6000 6 55 0 0.8000 10 30 25 1. 6 27 7 just substitute your new range for the -1.0 to 1.0 steps with r.colors color=rules, as long as the recode was linear. I think though that your easiest solution is to use NASA's 0-255 color rules. :) http://oceancolor.gsfc.nasa.gov/DOCS/palette_ndvi.txt http://oceancolor.gsfc.nasa.gov/PRODUCTS/colorbars.html you might be able to pipe those directly into r.colors or use them with r.colors rules=palette_ndvi.txt. see also http://grass.osgeo.org/wiki/MODIS#Set_colors Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] exploding a color table
Has anyone come up with a way to convert a streched color table for a floating point map into a set of discrete colors? I am thinking especially of NDVI, so I would like to generate the list of 256 colors along the NDVI floating point stretch to use with the result of r.recode that I used to convert my NDVI map to an integer map. If I could properly set the color table for that new map then I could maintain the symbolization within GRASS rather than having to spew a list of 256 colors for a Mapserver configuration. Any thoughts? -- View this message in context: http://www.nabble.com/exploding-a-color-table-tp17680217p17680217.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] exploding a color table
Neil Best wrote: Has anyone come up with a way to convert a streched color table for a floating point map into a set of discrete colors? I am thinking especially of NDVI, so I would like to generate the list of 256 colors along the NDVI floating point stretch to use with the result of r.recode that I used to convert my NDVI map to an integer map. If I could properly set the color table for that new map then I could maintain the symbolization within GRASS rather than having to spew a list of 256 colors for a Mapserver configuration. Any thoughts? I just discovered that r.recoe only produced 3 levels -- not what I was expecting for the rule: -1.0:1.0:0:255 I guess I would have to use r.mapcalc? -- View this message in context: http://www.nabble.com/exploding-a-color-table-tp17680217p17680396.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user