]> granicus.if.org Git - postgis/commitdiff
example of a custom color map
authorRegina Obe <lr@pcorp.us>
Fri, 10 May 2013 07:42:03 +0000 (07:42 +0000)
committerRegina Obe <lr@pcorp.us>
Fri, 10 May 2013 07:42:03 +0000 (07:42 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11398 b70326c6-7e19-0410-871a-916f4a2858ee

doc/html/images/st_colormap_red.png [new file with mode: 0644]
doc/reference_raster.xml

diff --git a/doc/html/images/st_colormap_red.png b/doc/html/images/st_colormap_red.png
new file mode 100644 (file)
index 0000000..b440a67
Binary files /dev/null and b/doc/html/images/st_colormap_red.png differ
index 9e2f709db324a2ac98aed908b6531a85aab3d95a..1fa048bc5d367241843f962cafab5eb8da29150c 100644 (file)
@@ -10898,21 +10898,35 @@ FROM (SELECT
 <programlisting>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
 </programlisting>                      
                        </refsection>
                        <refsection><title>Examples: Compare different color map looks using ST_AsPNG</title>
                                <programlisting>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;</programlisting>
 
 <informaltable>
-  <tgroup cols="3">
+  <tgroup cols="2">
        <tbody>
          <row>
                <entry><para><informalfigure>
@@ -10933,6 +10947,8 @@ FROM funky_shapes;</programlisting>
                        </mediaobject>
                  </informalfigure></para>
                 </entry>
+        </row>
+       <row>
                <entry><para><informalfigure>
                        <mediaobject>
                          <imageobject>
@@ -10942,7 +10958,16 @@ FROM funky_shapes;</programlisting>
                        </mediaobject>
                  </informalfigure></para>
                 </entry>
-               </row>
+                <entry><para><informalfigure>
+                       <mediaobject>
+                         <imageobject>
+                               <imagedata fileref="images/st_colormap_red.png" />
+                         </imageobject>
+                         <caption><para>red_png</para></caption>
+                       </mediaobject>
+                 </informalfigure></para>
+                </entry>
+       </row>  
        </tbody>
 </tgroup>
 </informaltable>
@@ -10951,10 +10976,11 @@ FROM funky_shapes;</programlisting>
                        <refsection>
                                <title>See Also</title>
                                <para>
-                                       <xref linkend="RT_ST_MapAlgebra" />, 
-                                       <xref linkend="RT_ST_Reclass" />,
                                        <xref linkend="RT_ST_AsPNG" />,
                                        <xref linkend="RT_ST_AsRaster" />
+                                       <xref linkend="RT_ST_MapAlgebra" />, 
+                                       <xref linkend="RT_ST_Reclass" />,
+                                       <xref linkend="RT_ST_Union" />
                                </para>
                        </refsection>
                </refentry>