Skip to content

Open Source Raster Symbolizattion #177

Description

@MattReimer

Raster Symbolozation

A good cross-platform and open-source way of symbolizing Raster files is by using the standards specified in the GRASS r.colors module

Here's what a typical .cpt file looks like:

https://grass.osgeo.org/grass78/manuals/r.colors.html

#
# white-green-red-blue-cyan profile, with distance along profile proportional
#   to x**4.0
#
# Designed by Duncan Carr Agnew, IGPP/SIO
# COLOR_MODEL = RGB
0.000 244 255 242  0.050 244 255 242
0.050 244 255 242  0.100 244 255 242
0.100 244 255 242  0.150 244 255 241
0.150 244 255 241  0.200 244 255 241
0.200 244 255 241  0.250 244 255 241
0.250 244 255 241  0.300 243 255 240
0.300 243 255 240  0.350 242 255 238
0.350 242 255 238  0.400 240 255 235
0.400 240 255 235  0.450 239 255 231
0.450 239 255 231  0.500 236 255 226
0.500 236 255 226  0.550 235 255 218
0.550 235 255 218  0.600 233 255 205
0.600 233 255 205  0.650 234 255 187
0.650 234 255 187  0.700 242 255 164
0.700 242 255 164  0.750 255 245 136
0.750 255 245 136  0.800 255 203 101
0.800 255 203 101  0.850 255 129  60
0.850 255 129  60  0.900 255  12  25
0.900 255  12  25  0.950 142  12 255
0.950 142  12 255  1.000  12 255 225

Here's a terrain map with discrete values

-11000 0 0 0
-500 0 0 30
-100 0 0 200
-1 150 150 255
0 0 120 0
100 0 150 0
270 90 165 90
300 90 175 90
500 50 180 50
500 70 170 70
1000 70 145 75
1000 70 155 75
2000 150 156 100
2800 220 220 220
3000 255 255 255
8850 255 255 255
nv white

More examples of color tables:

https://grasswiki.osgeo.org/wiki/Color_tables#Repositories

This can be used somewhat interchangeably with gdaldem color-relief

ESRI

With ESRI you should be able to export color ramps from your layers by "click the Colormap button and click Export a Colormap."

This will give you a .clr file which can be read both by ESRI using the "Add Colormap" tool as well as by GDAL when tiling.

Reading it back in using something like:
https://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/add-colormap.htm

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions