<!-- Optionally add a "See Also" section -->
<refsection>
<title>See Also</title>
- <para><xref linkend="RT_ST_GDALDrivers" />, <xref linkend="RT_ST_AsGDALRaster" />, <xref linkend="RT_Raster_Applications" /></para>
+ <para><xref linkend="RT_ST_AsGDALRaster" />, <xref linkend="RT_ST_ColorMap" />, <xref linkend="RT_ST_GDALDrivers" />, <xref linkend="RT_Raster_Applications" /></para>
</refsection>
</refentry>
, ref.rast, '8BUI'::text, i*5) As rast
FROM ref cross JOIN generate_series(1,10,3) As i ) As shapes ;</programlisting>
<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, 'pseudocolor')) As npseudo
+ , ST_NumBands(ST_ColorMap(rast, 'fire')) As nfire
+ , ST_NumBands(ST_ColorMap(rast, 'bluered')) As nbluered
, ST_NumBands(ST_ColorMap(rast, '100% 255 0 0
80% 160 0 0
50% 130 0 0
20% 60 0 0
0% 0 0 0
nv 255 255 255')) As nred
-FROM funky_shapes;
-
- n_orig | npseudo | ngrey | nred
---------+---------+-------+------
- 1 | 4 | 1 | 3
-</programlisting>
+FROM funky_shapes;</programlisting>
+<screen>
+ n_orig | ngrey | npseudo | nfire | nbluered | nred
+--------+-------+---------+-------+----------+------
+ 1 | 1 | 4 | 4 | 4 | 3
+</screen>
</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, 'pseudocolor')) As fire_png
+ , ST_AsPNG(ST_ColorMap(rast, 'bluered')) As bluered_png
, ST_AsPNG(ST_ColorMap(rast, '100% 255 0 0
80% 160 0 0
50% 130 0 0
FROM funky_shapes;</programlisting>
<informaltable>
- <tgroup cols="2">
+ <tgroup cols="3">
<tbody>
<row>
<entry><para><informalfigure>
</mediaobject>
</informalfigure></para>
</entry>
- </row>
- <row>
<entry><para><informalfigure>
<mediaobject>
<imageobject>
</mediaobject>
</informalfigure></para>
</entry>
+ </row>
+ <row>
+ <entry><para><informalfigure>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/st_colormap_fire.png" />
+ </imageobject>
+ <caption><para>fire_png</para></caption>
+ </mediaobject>
+ </informalfigure></para>
+ </entry>
+ <entry><para><informalfigure>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/st_colormap_bluered.png" />
+ </imageobject>
+ <caption><para>bluered_png</para></caption>
+ </mediaobject>
+ </informalfigure></para>
+ </entry>
<entry><para><informalfigure>
<mediaobject>
<imageobject>