]> granicus.if.org Git - postgis/commitdiff
put in missing protos for st_quantile. Revise comment generator scripts to properly...
authorRegina Obe <lr@pcorp.us>
Mon, 30 May 2011 03:43:09 +0000 (03:43 +0000)
committerRegina Obe <lr@pcorp.us>
Mon, 30 May 2011 03:43:09 +0000 (03:43 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7288 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_raster.xml
doc/xsl/postgis_comments.sql.xsl
doc/xsl/raster_comments.sql.xsl
doc/xsl/topology_comments.sql.xsl

index 6c470bb8e4d020cc28a4560b11daeac548ce50d1..34aaee5fa0b5a314b7d069c0c59b3f98b43ae226 100644 (file)
@@ -3129,8 +3129,71 @@ select st_bandisnodata(rast, 1) from dummy_rast where rid = 1; -- Expected true
        
        <sect1 id="RasterBand_Stats">
            <title>Raster Band Statistics and Analytics</title>
-           
-                       <refentry id="RT_ST_Quantile">
+               <refentry id="RT_ST_Count">
+                       <refnamediv>
+                               <refname>ST_Count</refname>
+                               <refpurpose>Returns the number of pixels in a given band of a raster or raster coverage.  If no band is specified defaults to band 1.  If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value.</refpurpose>
+                       </refnamediv>
+               
+                       <refsynopsisdiv>
+                               <funcsynopsis>
+                                 <funcprototype>
+                                       <funcdef>bigint <function>ST_Count</function></funcdef>
+                                       <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
+                                       <paramdef choice="opt"><type>integer </type> <parameter>nband=1</parameter></paramdef>
+                                       <paramdef choice="opt"><type>boolean </type> <parameter>exclude_nodata_value=true</parameter></paramdef>
+                                 </funcprototype>
+                                 <funcprototype>
+                                       <funcdef>bigint <function>ST_Count</function></funcdef>
+                                       <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
+                                       <paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></paramdef>
+                                 </funcprototype>
+                                 <funcprototype>
+                                       <funcdef>bigint <function>ST_Count</function></funcdef>
+                                       <paramdef><type>text </type> <parameter>rastertable</parameter></paramdef>
+                                       <paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef>
+                                       <paramdef choice="opt"><type>integer </type> <parameter>nband=1</parameter></paramdef>
+                                       <paramdef choice="opt"><type>boolean </type> <parameter>exclude_nodata_value=true</parameter></paramdef>
+                                 </funcprototype>
+                                 <funcprototype>
+                                       <funcdef>bigint <function>ST_Count</function></funcdef>
+                                       <paramdef><type>text </type> <parameter>rastertable</parameter></paramdef>
+                                       <paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef>
+                                       <paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></paramdef>
+                                 </funcprototype>
+                               </funcsynopsis>
+                       </refsynopsisdiv>
+               
+                       <refsection>
+                               <title>Description</title>
+                               
+                               <para>Returns the number of pixels in a given band of a raster or raster coverage.  If no band is specified <varname>nband</varname> defaults to 1. </para> 
+                               <note><para>If <varname>exclude_nodata_value</varname> is set to true, will only count pixels with value not equal to the <varname>nodata</varname> value of the raster. Set <varname>exclude_nodata_value</varname> to false to get count all pixels</para></note>
+                               <para>Availability: 2.0.0 </para>
+                       </refsection>
+                               
+                       <refsection>
+                               <title>Examples</title>
+                               <!-- TODO: Fix once we confirm the right behavior -->
+                               <programlisting>
+--example will count all pixels not 249 and one will count all pixels.  --
+SELECT rid, ST_Count(ST_SetBandNoDataValue(rast,249)) As exclude_nodata, 
+        ST_Count(ST_SetBandNoDataValue(rast,249),false) As include_nodata
+    FROM dummy_rast WHERE rid=2;
+                                   
+rid | exclude_nodata | include_nodata
+-----+----------------+----------------
+   2 |             23 |             25
+                               </programlisting>       
+                       </refsection>
+
+                       <refsection>
+                               <title>See Also</title>
+                               <para><xref linkend="RT_ST_SetBandNoDataValue" /></para>
+                       </refsection>
+               </refentry>
+               
+               <refentry id="RT_ST_Quantile">
                        <refnamediv>
                                <refname>ST_Quantile</refname>
                                <refpurpose>Compute quantiles in the context of the sample or population. Thus, a value could be examined to be at the raster's 25%, 50%, 75% percentile.</refpurpose>
@@ -3145,6 +3208,17 @@ select st_bandisnodata(rast, 1) from dummy_rast where rid = 1; -- Expected true
                                        <paramdef choice='opt'><type>boolean </type> <parameter>exclude_nodata_value=true</parameter></paramdef>
                                        <paramdef choice='opt'><type>double precision[] </type> <parameter>quantiles=NULL</parameter></paramdef>
                                  </funcprototype>
+                                 <funcprototype>
+                                       <funcdef>SETOF quantile <function>ST_Quantile</function></funcdef>
+                                       <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
+                                       <paramdef><type>double precision[] </type> <parameter>quantiles</parameter></paramdef>
+                                 </funcprototype>
+                                 <funcprototype>
+                                       <funcdef>SETOF quantile <function>ST_Quantile</function></funcdef>
+                                       <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
+                                       <paramdef><type>integer </type> <parameter>nband</parameter></paramdef>
+                                       <paramdef><type>double precision[] </type> <parameter>quantiles</parameter></paramdef>
+                                 </funcprototype>
                                  <funcprototype>
                                        <funcdef>double precision <function>ST_Quantile</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
@@ -3162,6 +3236,13 @@ select st_bandisnodata(rast, 1) from dummy_rast where rid = 1; -- Expected true
                                        <paramdef><type>integer </type> <parameter>nband</parameter></paramdef>
                                        <paramdef><type>double precision </type> <parameter>quantile</parameter></paramdef>
                                  </funcprototype>
+                                 <funcprototype>
+                                       <funcdef>double precision <function>ST_Quantile</function></funcdef>
+                                       <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
+                                       <paramdef><type>integer </type> <parameter>nband</parameter></paramdef>
+                                       <paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></paramdef>
+                                       <paramdef><type>double precision </type> <parameter>quantile</parameter></paramdef>
+                                 </funcprototype>
                                  <funcprototype>
                                        <funcdef>double precision <function>ST_Quantile</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
@@ -3244,69 +3325,6 @@ ORDER BY value, quantile,rid
                                <para><xref linkend="RT_ST_Count" />, <xref linkend="RT_ST_SetBandNoDataValue" /></para>
                        </refsection>
                </refentry>
-               <refentry id="RT_ST_Count">
-                       <refnamediv>
-                               <refname>ST_Count</refname>
-                               <refpurpose>Returns the number of pixels in a given band of a raster or raster coverage.  If no band is specified defaults to band 1.  If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value.</refpurpose>
-                       </refnamediv>
-               
-                       <refsynopsisdiv>
-                               <funcsynopsis>
-                                 <funcprototype>
-                                       <funcdef>bigint <function>ST_Count</function></funcdef>
-                                       <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
-                                       <paramdef choice="opt"><type>integer </type> <parameter>nband=1</parameter></paramdef>
-                                       <paramdef choice="opt"><type>boolean </type> <parameter>exclude_nodata_value=true</parameter></paramdef>
-                                 </funcprototype>
-                                 <funcprototype>
-                                       <funcdef>bigint <function>ST_Count</function></funcdef>
-                                       <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
-                                       <paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></paramdef>
-                                 </funcprototype>
-                                 <funcprototype>
-                                       <funcdef>bigint <function>ST_Count</function></funcdef>
-                                       <paramdef><type>text </type> <parameter>rastertable</parameter></paramdef>
-                                       <paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef>
-                                       <paramdef choice="opt"><type>integer </type> <parameter>nband=1</parameter></paramdef>
-                                       <paramdef choice="opt"><type>boolean </type> <parameter>exclude_nodata_value=true</parameter></paramdef>
-                                 </funcprototype>
-                                 <funcprototype>
-                                       <funcdef>bigint <function>ST_Count</function></funcdef>
-                                       <paramdef><type>text </type> <parameter>rastertable</parameter></paramdef>
-                                       <paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef>
-                                       <paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></paramdef>
-                                 </funcprototype>
-                               </funcsynopsis>
-                       </refsynopsisdiv>
-               
-                       <refsection>
-                               <title>Description</title>
-                               
-                               <para>Returns the number of pixels in a given band of a raster or raster coverage.  If no band is specified <varname>nband</varname> defaults to 1. </para> 
-                               <note><para>If <varname>exclude_nodata_value</varname> is set to true, will only count pixels with value not equal to the <varname>nodata</varname> value of the raster. Set <varname>exclude_nodata_value</varname> to false to get count all pixels</para></note>
-                               <para>Availability: 2.0.0 </para>
-                       </refsection>
-                               
-                       <refsection>
-                               <title>Examples</title>
-                               <!-- TODO: Fix once we confirm the right behavior -->
-                               <programlisting>
---example will count all pixels not 249 and one will count all pixels.  --
-SELECT rid, ST_Count(ST_SetBandNoDataValue(rast,249)) As exclude_nodata, 
-        ST_Count(ST_SetBandNoDataValue(rast,249),false) As include_nodata
-    FROM dummy_rast WHERE rid=2;
-                                   
-rid | exclude_nodata | include_nodata
------+----------------+----------------
-   2 |             23 |             25
-                               </programlisting>       
-                       </refsection>
-
-                       <refsection>
-                               <title>See Also</title>
-                               <para><xref linkend="RT_ST_SetBandNoDataValue" /></para>
-                       </refsection>
-               </refentry>
                
                <refentry id="RT_ST_ValueCount">
                        <refnamediv>
index 5ffbe79b5649e8725a68dd9bc00ad03b7af73c5e..60630c08bee2b26ea2cdeac225db893915256eaa 100644 (file)
 </xsl:when>\r
                </xsl:choose>\r
 <!-- For each function prototype generate the DDL comment statement\r
-       If its input is a geometry set - we know it is an aggregate function rather than a regular function -->\r
+       If its input is a geometry set - we know it is an aggregate function rather than a regular function \r
+       Do not output OUT params since they define output rather than act as input and do not put a comma after argument just before an OUT parameter -->\r
                <xsl:for-each select="refsynopsisdiv/funcsynopsis/funcprototype">\r
 COMMENT ON <xsl:choose><xsl:when test="contains(paramdef/type,'geometry set')">AGGREGATE</xsl:when><xsl:otherwise>FUNCTION</xsl:otherwise></xsl:choose><xsl:text> </xsl:text> <xsl:value-of select="funcdef/function" />(<xsl:for-each select="paramdef"><xsl:choose><xsl:when test="count(parameter) &gt; 0"> \r
-<xsl:choose><xsl:when test="contains(type,'geometry set')">geometry</xsl:when><xsl:otherwise><xsl:value-of select="type" /></xsl:otherwise></xsl:choose><xsl:if test="position()&lt;last()"><xsl:text>, </xsl:text></xsl:if></xsl:when>\r
+<xsl:choose><xsl:when test="contains(parameter,'OUT')"></xsl:when><xsl:when test="contains(type,'geometry set')">geometry</xsl:when><xsl:otherwise><xsl:value-of select="type" /></xsl:otherwise></xsl:choose><xsl:if test="position()&lt;last() and not(contains(parameter,'OUT')) and not(contains(following-sibling::paramdef[1],'OUT'))"><xsl:text>, </xsl:text></xsl:if></xsl:when>\r
 </xsl:choose></xsl:for-each>) IS '<xsl:call-template name="listparams"><xsl:with-param name="func" select="." /></xsl:call-template> <xsl:value-of select='$comment' />';\r
                        </xsl:for-each>\r
                </xsl:for-each>\r
index 8a2478b13c8f41974550cf863c7b07dfe0727396..fe155c19ab843c2b46dbccaabfb2532399d0587d 100644 (file)
                </xsl:variable>\r
 <!-- For each function prototype generate the DDL comment statement\r
        If its input is a geometry set - we know it is an aggregate function rather than a regular function.\r
-       Do not output OUT params since they define output rathe than act as input -->\r
+       Do not output OUT params since they define output rather than act as input and do not put a comma after argument just before an OUT parameter -->\r
                <xsl:for-each select="refsynopsisdiv/funcsynopsis/funcprototype">\r
 COMMENT ON <xsl:choose><xsl:when test="contains(paramdef/type,'geometry set')">AGGREGATE</xsl:when><xsl:otherwise>FUNCTION</xsl:otherwise></xsl:choose><xsl:text> </xsl:text> <xsl:value-of select="funcdef/function" />(<xsl:for-each select="paramdef"><xsl:choose><xsl:when test="count(parameter) &gt; 0"> \r
-<xsl:choose><xsl:when test="contains(parameter,'OUT')"></xsl:when><xsl:when test="contains(type,'geometry set')">geometry</xsl:when><xsl:otherwise><xsl:value-of select="type" /></xsl:otherwise></xsl:choose><xsl:if test="position()&lt;last() and not(contains(parameter,'OUT'))"><xsl:text>, </xsl:text></xsl:if></xsl:when>\r
+<xsl:choose><xsl:when test="contains(parameter,'OUT')"></xsl:when><xsl:when test="contains(type,'geometry set')">geometry</xsl:when><xsl:otherwise><xsl:value-of select="type" /></xsl:otherwise></xsl:choose><xsl:if test="position()&lt;last() and not(contains(parameter,'OUT')) and not(contains(following-sibling::paramdef[1],'OUT'))"><xsl:text>, </xsl:text></xsl:if></xsl:when>\r
 </xsl:choose></xsl:for-each>) IS '<xsl:call-template name="listparams"><xsl:with-param name="func" select="." /></xsl:call-template> <xsl:value-of select='$comment' />';\r
                        </xsl:for-each>\r
                </xsl:for-each>\r
index a8f2c43bc2b76105670de33492fdfbc31cf4d38c..56c763bc8fd828396754339d581e50a32637e2c6 100644 (file)
@@ -41,10 +41,11 @@ set search_path=topology,public,pg_catalog;
 </xsl:when>\r
                </xsl:choose>\r
 <!-- For each function prototype generate the DDL comment statement\r
-       If its input is a geometry set - we know it is an aggregate function rather than a regular function -->\r
+       If its input is a geometry set - we know it is an aggregate function rather than a regular function \r
+       Do not output OUT params since they define output rather than act as input and do not put a comma after argument just before an OUT parameter -->\r
                <xsl:for-each select="refsynopsisdiv/funcsynopsis/funcprototype">\r
 COMMENT ON <xsl:choose><xsl:when test="contains(paramdef/type,' set')">AGGREGATE</xsl:when><xsl:otherwise>FUNCTION</xsl:otherwise></xsl:choose><xsl:text> </xsl:text> <xsl:value-of select="funcdef/function" />(<xsl:for-each select="paramdef"><xsl:choose><xsl:when test="count(parameter) &gt; 0"> \r
-<xsl:choose><xsl:when test="contains(type,'topoelement set')">topoelement</xsl:when><xsl:otherwise><xsl:value-of select="type" /></xsl:otherwise></xsl:choose><xsl:if test="position()&lt;last()"><xsl:text>, </xsl:text></xsl:if></xsl:when>\r
+<xsl:choose><xsl:when test="contains(parameter,'OUT')"></xsl:when><xsl:when test="contains(type,'topoelement set')">topoelement</xsl:when><xsl:otherwise><xsl:value-of select="type" /></xsl:otherwise></xsl:choose><xsl:if test="position()&lt;last() and not(contains(parameter,'OUT')) and not(contains(following-sibling::paramdef[1],'OUT'))"><xsl:text>, </xsl:text></xsl:if></xsl:when>\r
 </xsl:choose></xsl:for-each>) IS '<xsl:call-template name="listparams"><xsl:with-param name="func" select="." /></xsl:call-template> <xsl:value-of select='$comment' />';\r
                        </xsl:for-each>\r
                </xsl:for-each>\r