<para><xref linkend="spatial_ref_sys" />, <xref linkend="ST_SRID" /></para>
</refsection>
</refentry>
-
- <refentry id="RT_ST_SRText">
- <refnamediv>
- <refname>ST_SRText</refname>
- <refpurpose>Returns the spatial reference srtext from spatial_ref_sys table corresponding to srid of raster.</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>text <function>ST_SRText</function></funcdef>
- <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
-
- <refsection>
- <title>Description</title>
-
- <para>Returns the srtext corresponding to the spatial referenceof the raster object as defined in the spatial_ref_sys table. If not
- defined returns proj4text and if not in spatial_ref_sys returns NULL.</para>
-
- <para>Availability: 2.0.0 </para>
- </refsection>
-
- <refsection>
- <title>Examples</title>
-
- <programlisting>SELECT ST_SRSText(rast) As srtext
-FROM somerast_table WHERE rid=2;
-
-srtext
-----------------
-"GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,
-AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],
-PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
-UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]"
- </programlisting>
- </refsection>
-
- <!-- Optionally add a "See Also" section -->
- <refsection>
- <title>See Also</title>
- <para><xref linkend="spatial_ref_sys" />, <xref linkend="ST_SRID" /></para>
- </refsection>
- </refentry>
<refentry id="RT_ST_UpperLeftX">
<refnamediv>
<paramdef><type>double precision </type> <parameter>OUT value</parameter></paramdef>
<paramdef><type>double precision </type> <parameter>OUT count</parameter></paramdef>
</funcprototype>
+
<funcprototype>
<funcdef>integer <function>ST_ValueCount</function></funcdef>
<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
<paramdef><type>double precision </type> <parameter>searchvalue</parameter></paramdef>
<paramdef choice="opt"><type>double precision </type> <parameter>roundto=0</parameter></paramdef>
</funcprototype>
+
+ <funcprototype>
+ <funcdef>integer <function>ST_ValueCount</function></funcdef>
+ <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
+ <paramdef><type>integer </type> <parameter>nband</parameter></paramdef>
+ <paramdef><type>double precision </type> <parameter>searchvalue</parameter></paramdef>
+ <paramdef choice="opt"><type>double precision </type> <parameter>roundto=0</parameter></paramdef>
+ </funcprototype>
+
<funcprototype>
<funcdef>SETOF record <function>ST_ValueCount</function></funcdef>
<paramdef><type>text </type> <parameter>rastertable</parameter></paramdef>
<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
<paramdef><type>text </type> <parameter>format</parameter></paramdef>
<paramdef><type>text[] </type> <parameter>options</parameter></paramdef>
- <paramdef><type>text </type> <parameter>srs</parameter></paramdef>
+ <paramdef><type>integer </type> <parameter>srid</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<!-- Optionally add a "See Also" section -->
<refsection>
<title>See Also</title>
- <para><xref linkend="RT_ST_GDALDrivers" /></para>
+ <para><xref linkend="RT_ST_GDALDrivers" />, <xref linkend="RT_ST_SRID" /></para>
</refsection>
</refentry>
<refsection>
<title>Description</title>
- <para>Returns the selected bands of the raster as a single Portable Network Graphics Image (PNG). Use <xref linkend="RT_ST_AsGDALRaster" /> if you need to export as less common raster types. If no band is specified, then the first 3 bands are exported. There are many variants of the function with many options. If no <varname>srs</varname> is specified then then srs of the raster is used. These are itemized below:</para>
+ <para>Returns the selected bands of the raster as a single Portable Network Graphics Image (PNG). Use <xref linkend="RT_ST_AsGDALRaster" /> if you need to export as less common raster types. If no band is specified, then the first 3 bands are exported. There are many variants of the function with many options. If no <varname>srid</varname> is specified then then srid of the raster is used. These are itemized below:</para>
<itemizedlist>
<listitem>
<varname>nband</varname> is for single band exports.
<funcdef>bytea <function>ST_AsTIFF</function></funcdef>
<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
<paramdef choice="opt"><type>text[] </type> <parameter>options=''</parameter></paramdef>
- <paramdef><type>text </type> <parameter>srs=sameassource</parameter></paramdef>
+ <paramdef><type>integer </type> <parameter>srid=sameassource</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>bytea <function>ST_AsTIFF</function></funcdef>
<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
<paramdef choice="opt"><type>text </type> <parameter>compression=''</parameter></paramdef>
- <paramdef choice="opt"><type>text </type> <parameter>srs=sameassource</parameter></paramdef>
+ <paramdef choice="opt"><type>integer </type> <parameter>srid=sameassource</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>bytea <function>ST_AsTIFF</function></funcdef>
<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
<paramdef><type>integer[] </type> <parameter>nbands</parameter></paramdef>
<paramdef choice="opt"><type>text </type> <parameter>compression=''</parameter></paramdef>
- <paramdef choice="opt"><type>text </type> <parameter>srs=sameassource</parameter></paramdef>
+ <paramdef choice="opt"><type>integer </type> <parameter>srid=sameassource</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>bytea <function>ST_AsTIFF</function></funcdef>
<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
<paramdef><type>integer[] </type> <parameter>nbands</parameter></paramdef>
<paramdef><type>text[] </type> <parameter>options</parameter></paramdef>
- <paramdef><type>text </type> <parameter>srs=sameassource</parameter></paramdef>
+ <paramdef><type>integer </type> <parameter>srid=sameassource</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
</listitem>
<listitem><varname>compression</varname> Compression expression -- JPEG90 (or someother percent), LZMA, JPEG, DEFALTE9. </listitem>
<listitem><varname>options</varname> text Array of GDAL create options as defined for GTiff (look at create_options for GTiff of <xref linkend="RT_ST_GDALDrivers" />). or refer to <ulink url="http://www.gdal.org/frmt_various.html">GDAL Raster format options</ulink> for more details. </listitem>
- <listitem><varname>srs</varname> If not specified uses the srtext corresponding to the spatial_ref_sys of the raster. </listitem>
+ <listitem><varname>srid</varname> srid of spatial_ref_sys of the raster. This is used to populate the georeference information </listitem>
</itemizedlist>
<para>Availability: 2.0.0 - requires GDAL >= 1.6.0. </para>
</refsection>
<!-- 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_ST_SRText" /></para>
+ <para><xref linkend="RT_ST_GDALDrivers" />, <xref linkend="RT_ST_AsGDALRaster" />, <xref linkend="RT_ST_SRID" /></para>
</refsection>
</refentry>
</sect1>