From: Regina Obe Date: Fri, 10 May 2013 07:42:03 +0000 (+0000) Subject: example of a custom color map X-Git-Tag: 2.1.0beta2~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eeeb9c0ffe46a1e33d4963f9c6668d919033aa41;p=postgis example of a custom color map git-svn-id: http://svn.osgeo.org/postgis/trunk@11398 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/html/images/st_colormap_red.png b/doc/html/images/st_colormap_red.png new file mode 100644 index 000000000..b440a67c3 Binary files /dev/null and b/doc/html/images/st_colormap_red.png differ diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index 9e2f709db..1fa048bc5 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -10898,21 +10898,35 @@ FROM (SELECT SELECT ST_NumBands(rast) As n_orig , ST_NumBands(ST_ColorMap(rast, 'pseudocolor')) As npseudo , ST_NumBands(ST_ColorMap(rast, 'greyscale')) As ngrey + , ST_NumBands(ST_ColorMap(rast, '100% 255 0 0 +80% 160 0 0 +50% 130 0 0 +30% 30 0 0 +20% 60 0 0 +0% 0 0 0 +nv 255 255 255')) As nred FROM funky_shapes; - n_orig | npseudo | ngrey ---------+---------+------- - 1 | 4 | 1 + n_orig | npseudo | ngrey | nred +--------+---------+-------+------ + 1 | 4 | 1 | 3 Examples: Compare different color map looks using ST_AsPNG SELECT ST_AsPNG(rast) As orig_png , ST_AsPNG(ST_ColorMap(rast,'greyscale')) As grey_png , ST_AsPNG(ST_ColorMap(rast, 'pseudocolor')) As pseudo_png + , ST_AsPNG(ST_ColorMap(rast, '100% 255 0 0 +80% 160 0 0 +50% 130 0 0 +30% 30 0 0 +20% 60 0 0 +0% 0 0 0 +nv 255 255 255')) As red_png FROM funky_shapes; - + @@ -10933,6 +10947,8 @@ FROM funky_shapes; + + @@ -10942,7 +10958,16 @@ FROM funky_shapes; - + + + + + + red_png + + + + @@ -10951,10 +10976,11 @@ FROM funky_shapes; See Also - , - , , + , + , +