]> granicus.if.org Git - postgis/commitdiff
#824 more corrections from Kashif Rasul
authorRegina Obe <lr@pcorp.us>
Thu, 10 Feb 2011 11:59:20 +0000 (11:59 +0000)
committerRegina Obe <lr@pcorp.us>
Thu, 10 Feb 2011 11:59:20 +0000 (11:59 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6798 b70326c6-7e19-0410-871a-916f4a2858ee

15 files changed:
doc/README
doc/extras_tigergeocoder.xml
doc/faq.xml
doc/faq_raster.xml
doc/geography.txt
doc/installation.xml
doc/reference_accessor.xml
doc/reference_lrs.xml
doc/reference_misc.xml
doc/reference_output.xml
doc/reference_processing.xml
doc/reference_raster.xml
doc/release_notes.xml
doc/using_postgis_dataman.xml
doc/xsl/postgis_aggs_mm.xml.xsl

index 2dcafea9636b6fc80159571c1c3d6826632d9f83..d7df8926ea55727f61ef4bb0328d1b854d37fe80 100644 (file)
@@ -2,7 +2,7 @@
 Overview
 ====================================================
 
-Postgis documentation is written in docbook xml.  The input file is postgis.xml, 
+PostGIS documentation is written in docbook xml.  The input file is postgis.xml, 
 which in turn includes all the individual chapter xml files.  From that file we 
 can convert to chunked html, single-file html and pdf.
 
@@ -11,11 +11,11 @@ Make targets are:
   make                      # defaults to creating  
                             #   - the images used in the generated documentation
                             #   - the documentation as a single html file
-                            #   - a sql script used to apply COMMENTS for every postgis function
+                            #   - a sql script used to apply COMMENTS for every PostGIS function
   
   make html/postgis.html    # generates a single-file html file called html/postgis.html
   make chunked-html         # generates a separate html file for every chapter or section break
-  make pdf                  # generates a single pdf file with the postgis version as a filename
+  make pdf                  # generates a single pdf file with the PostGIS version as a filename
   make images               # generates all the images used in the html and pdf targets
   make comments             # generates a sql script that add COMMENTs for every function (derived from the documentation)
   make doxygen              # generates the developer's documentation using Doxygen
index cd3379631e333e784d78b46ef90f971bcf6eec31..3269bc67fc6cce1d499e781087b1444c9510bfd7 100644 (file)
@@ -83,7 +83,7 @@
 --------+---------------------------+------+---------+------+--------+----+-------
       0 | POINT(-71.05518 42.36311) |  226 | Hanover | St   | Boston | MA | 02113
 </programlisting>     
-<para>Can handle misspellings and provides more than one possible solution with ratings and takes longer (4 seconds on fairly crappy single processor 3GIG RAM XP box, but 453 ms on windows 2003 8 GIG ram 2 processor quad core server) .</para>
+<para>Can handle misspellings and provides more than one possible solution with ratings and takes longer (4 seconds on fairly crappy single processor 3GIG RAM XP box, but 453 ms on windows 2003 8 GIG ram 2 processor quad core server).</para>
 <programlisting>SELECT g.rating, ST_AsText(ST_SnapToGrid(g.geomout,0.00001)) As wktlonlat, 
     (addy).address As stno, (addy).streetname As street, 
        (addy).streettypeabbrev As styp, (addy).location As city, (addy).stateabbrev As st,(addy).zip 
index 8f71817d6b64019991a9ba08a0a8a3988dff50a8..2d3b4ceb6e2536680c90d372760122e02834fdb7 100644 (file)
@@ -85,7 +85,7 @@ SELECT MAX(ST_NPoints(geom)) FROM sometable;</programlisting>
       </question>
       <answer>
         <para>Your questions are too deep and complex to be adequately answered in this section. Please refer to our
-                       <xref linkend="PostGIS_Geography_AdvancedFAQ" /> .</para>
+                       <xref linkend="PostGIS_Geography_AdvancedFAQ" />.</para>
       </answer>
     </qandaentry>
 
index 38d35d6723ffbcaca90a2df387b34b329402a16a..e2dbb91c093ba297c3199368dc6c58b752456222 100644 (file)
@@ -39,7 +39,7 @@
 
       <answer>
         <para>The easiest is to download binaries for PostGIS and Raster which are currently available for windows and latest versions of Mac OSX. 
-               First you need a working PostGIS 1.3.5 or above and be running PostgreSQL 8.3, 8.4, or 9.0. Note in POstGIS 2.0 PostGIS Raster is fully integrated, so it will be compiled when you compile PostGIS.</para>
+               First you need a working PostGIS 1.3.5 or above and be running PostgreSQL 8.3, 8.4, or 9.0. Note in PostGIS 2.0 PostGIS Raster is fully integrated, so it will be compiled when you compile PostGIS.</para>
         <para>
                        If you are on windows, you can compile yourself, or use the <ulink
             url="http://www.postgis.org/download/windows/experimental.php#wktraster">pre-compiled
@@ -90,8 +90,8 @@
       </question>
 
       <answer>
-        <para>Any that your gdal library supports. GDAL supported formats are documented <ulink url="http://www.gdal.org/formats_list.html">GDAL File Formats</ulink>.</para>
-               <para>Your particular gdal install may not support all formats.  To verify the ones supported by your particular gdal install, you can use</para> 
+        <para>Any that your GDAL library supports. GDAL supported formats are documented <ulink url="http://www.gdal.org/formats_list.html">GDAL File Formats</ulink>.</para>
+               <para>Your particular GDAL install may not support all formats.  To verify the ones supported by your particular GDAL install, you can use</para> 
                <programlisting>gdalinfo --formats</programlisting>
       </answer>
     </qandaentry>
                <para>If you are compiling from source, you need to include in your configure 
                 <programlisting>--with-pg=path/to/pg_config</programlisting>  to enable the driver.
                 Refer to <ulink url="http://trac.osgeo.org/gdal/wiki/BuildHints">GDAL Build Hints</ulink> for tips
-                on building gdal against in various OS platforms.
+                on building GDAL against in various OS platforms.
                 </para>
                 <para>If your version of GDAL is compiled with the PostGIS Raster driver 
                 you should see PostGIS Raster in list when you do 
                 <programlisting>gdalinfo --formats</programlisting></para>
                 
-                <para>To get a summary about your raster via gdal use gdalinfo:
+                <para>To get a summary about your raster via GDAL use gdalinfo:
                 <programlisting>gdalinfo  "PG:host=localhost port=5432 dbname='mygisdb' user='postgres' password='whatever' schema='someschema' table=sometable"</programlisting>
                 </para>
                
                <para>We know for sure the following windows binaries have PostGIS Raster built in.</para>
                <para><ulink url="http://fwtools.maptools.org/">FWTools latest stable version for Windows is compiled with Raster support</ulink>.</para>
                <para>PostGIS Raster is undergoing many changes.  If you want to get the latest nightly build for Windows -- then check out 
-                the Tamas Szekeres  nightly builds built with Visual Studio which contain GDAL trunk, Python Bindings and Mapserver executables and PostGIS Raster driver built-in.  Just
+                the Tamas Szekeres  nightly builds built with Visual Studio which contain GDAL trunk, Python Bindings and MapServer executables and PostGIS Raster driver built-in.  Just
                        click the SDK bat and run your commands from there.  <ulink url="http://vbkto.dyndns.org/sdk/">http://vbkto.dyndns.org/sdk/</ulink>.
                        Also available are VS project files.</para>
        </answer>
     
     <qandaentry>
       <question>
-        <para>How can I add a PostGIS raster layer to my Mapserver map?</para>
+        <para>How can I add a PostGIS raster layer to my MapServer map?</para>
       </question>
 
       <answer>
         <para>You can much like you can with any other raster.  
-        Refer to <ulink url="http://mapserver.org/input/raster.html">Mapserver Raster processing options</ulink>
-        for list of various processing functions you can use with Mapserver raster layers.</para>
+        Refer to <ulink url="http://mapserver.org/input/raster.html">MapServer Raster processing options</ulink>
+        for list of various processing functions you can use with MapServer raster layers.</para>
         <para>What makes PostGIS raster data particularly interesting, is that since 
                each tile can have various standard database columns, you can segment it in your data source</para>
-        <para>Below is an example of how you would define a PostGIS raster layer in Mapserver.</para>
+        <para>Below is an example of how you would define a PostGIS raster layer in MapServer.</para>
         <programlisting>
 -- displaying raster with standard raster options
 LAYER
index 74dc5a0721a5b318ee2cd9833b5321d709c7d01c..976e6f08a00afacb1311a85bf5a50ddeb1b9d773 100644 (file)
@@ -140,7 +140,7 @@ You can also add SRID restrictions to a column, though at this point (with only
 Using Input/Output Functions
 ============================
 
-There are only four intput/output functions at this time supporting the OGC well-known text (WKT) and well-known binary (WKB) formats. Adding further output formats (GML, GeoJSON) should be straight-forward, borrowing code from the geometry implementations.
+There are only four input/output functions at this time supporting the OGC well-known text (WKT) and well-known binary (WKB) formats. Adding further output formats (GML, GeoJSON) should be straight-forward, borrowing code from the geometry implementations.
 
 * ST_AsText(geography) returns text
 * ST_AsBinary(geography) returns bytea
index c3f520d48ed81afd30cdfc9ceeea992943a25704..43527d423dc261069e2eb1dce982d642f06aabc9 100644 (file)
@@ -796,7 +796,7 @@ Failed: 0
        </para>
 
        <para>
-         Before attempting to upgrade postgis, it is always worth to backup your
+         Before attempting to upgrade PostGIS, it is always worth to backup your
          data. If you use the -Fc flag to pg_dump you will always be able to
          restore the dump with an HARD UPGRADE.
        </para>
@@ -807,7 +807,7 @@ Failed: 0
          <para>
                After compiling you should find several <filename>postgis_upgrade*.sql</filename> files.  Install the one
                for your version of PostGIS.  For example <filename>postgis_upgrade_13_to_15.sql</filename> should be used if you are upgrading 
-               from postgis 1.3 to 1.5.
+               from PostGIS 1.3 to 1.5.
          </para>
 
          <programlisting>$ psql -f postgis_upgrade_13_to_15.sql -d your_spatial_database</programlisting>
@@ -834,7 +834,7 @@ Failed: 0
 
          <para>
                By HARD UPGRADE we intend full dump/reload of postgis-enabled databases.
-               You need an HARD UPGRADE when postgis objects' internal storage changes
+               You need an HARD UPGRADE when PostGIS objects' internal storage changes
                or when SOFT UPGRADE is not possible. The
                <link linkend="release_notes">Release Notes</link>
                appendix reports for each version whether you need a dump/reload (HARD
@@ -855,7 +855,7 @@ Failed: 0
          <programlisting>$ pg_dump -Fc olddb &gt; olddb.dump</programlisting>
 
          <para>
-               Restore the dump contextually upgrading postgis into a new database. The
+               Restore the dump contextually upgrading PostGIS into a new database. The
                new database doesn't have to exist. postgis_restore accepts createdb
                parameters after the dump file name, and that can for instance be used
                if you are using a non-default character encoding for your database.
index c384010423574c73a0d507302eaf2af244b70705..606972872dcb7141b071517d49e154460728f532 100644 (file)
@@ -845,7 +845,7 @@ postgis=# SELECT ST_IsCollection('GEOMETRYCOLLECTION(POINT(0 0))'::geometry);
          <refnamediv>
                <refname>ST_IsEmpty</refname>
 
-               <refpurpose>Returns true if this Geometry is an empty geometry . If
+               <refpurpose>Returns true if this Geometry is an empty geometry. If
                                true, then this Geometry represents the empty point set - i.e.
                                GEOMETRYCOLLECTION(EMPTY).</refpurpose>
 
@@ -863,7 +863,7 @@ postgis=# SELECT ST_IsCollection('GEOMETRYCOLLECTION(POINT(0 0))'::geometry);
          <refsection>
                <title>Description</title>
 
-               <para>Returns true if this Geometry is an empty geometry . If
+               <para>Returns true if this Geometry is an empty geometry. If
                                true, then this Geometry represents an empty geometry collection, polygon, point etc.</para>
                <note>
                        <para>SQL-MM defines the result of ST_IsEmpty(NULL) to be 0, while
index 2dccd123b091218c2f96abca07ec3aae96f4a514..eda4f974542cb79fc46475c689f254505225671c 100644 (file)
@@ -209,7 +209,7 @@ FROM (SELECT ST_GeomFromText('LINESTRING(1 2, 4 5, 6 7)') As the_line) As foo;
                          unspecified values.</para>
                        </note>
 
-                       <para>Availability: 1.1.0 , Z and M supported added in 1.1.1</para>
+                       <para>Availability: 1.1.0, Z and M supported added in 1.1.1</para>
                        <para>&Z_support;</para>
                  </refsection>
 
index db724419df3368e438506030671a9e8c78a01868..fb1ab1524f49ccc3de3aeb9ed42af601f74fe814 100644 (file)
@@ -595,7 +595,7 @@ fulltable_size geomsize  pergeom
          <refnamediv>
                <refname>ST_Point_Inside_Circle</refname>
 
-               <refpurpose>Is the point geometry insert circle defined by center_x, center_y , radius</refpurpose>
+               <refpurpose>Is the point geometry insert circle defined by center_x, center_y, radius</refpurpose>
          </refnamediv>
 
          <refsynopsisdiv>
index e8110a8b8fd691104b8d7f5d54b5628549ddb338..40bd07db9dc4c82d3beee40a826f1b573eda8d94 100644 (file)
@@ -827,7 +827,7 @@ SELECT ST_AsGML(3, ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0
                        geometries are delimited by semicolons (";").</para>
 
                <note>
-                 <para>Availability: 1.2.2 . Availability: 1.4.0  Changed in PostGIS 1.4.0 to include L command in absolute path to conform to <ulink
+                 <para>Availability: 1.2.2. Availability: 1.4.0  Changed in PostGIS 1.4.0 to include L command in absolute path to conform to <ulink
                        url="http://www.w3.org/TR/SVG/paths.html#PathDataBNF">http://www.w3.org/TR/SVG/paths.html#PathDataBNF</ulink></para>
                </note>
          </refsection>
index fca2622753f067e83a2bf616af143b196914037a..228d6bfb2b863789f86b28921d385f623b331bcf 100644 (file)
@@ -2392,7 +2392,7 @@ MULTILINESTRING((1 3 2.75,1 4 2),(1 1 3,1 2 2.25))
 
   <refsection>
        <title>Description</title>
-       <para> Output type can be a MULTI* , single geometry, or Geometry Collection. Comes in 2 variants.  Variant 1 unions 2 geometries resulting in a new geometry with no intersecting regions.
+       <para> Output type can be a MULTI*, single geometry, or Geometry Collection. Comes in 2 variants.  Variant 1 unions 2 geometries resulting in a new geometry with no intersecting regions.
                Variant 2 is an aggregate function that takes a set of geometries and unions
                them into a single ST_Geometry resulting in no intersecting regions.</para>
 
@@ -2403,7 +2403,7 @@ MULTILINESTRING((1 3 2.75,1 4 2),(1 1 3,1 2 2.25))
                functions do.</para>
 
        <para>Non-Aggregate version: This function returns a geometry being a union of two
-               input geometries. Output type can be a MULTI* ,NON-MULTI or
+               input geometries. Output type can be a MULTI*NON-MULTI or
                GEOMETRYCOLLECTION.</para>
 
        <note><para>ST_Collect and ST_Union are often interchangeable.
index dbc1068f435dbcd544c9f1c3520909a1ed94a442..c1734d82e04b46cba346ae027d6d2d7439a76e09 100644 (file)
@@ -828,7 +828,7 @@ FROM dummy_rast;
                <refentry id="RT_ST_Raster2WorldCoordX">
                        <refnamediv>
                                <refname>ST_Raster2WorldCoordX</refname>
-                               <refpurpose>Returns the geometric x coordinate upper left of a raster , column and row. Numbering of columns
+                               <refpurpose>Returns the geometric x coordinate upper left of a raster, column and row. Numbering of columns
                                        and rows starts at 1. </refpurpose>
                        </refnamediv>
                
@@ -902,7 +902,7 @@ FROM (SELECT rid, ST_SetSkew(rast,100.5,0) As rast FROM dummy_rast) As foo;
                <refentry id="RT_ST_Raster2WorldCoordY">
                        <refnamediv>
                                <refname>ST_Raster2WorldCoordY</refname>
-                               <refpurpose>Returns the geometric y coordinate upper left corner of a raster , column and row. Numbering of columns
+                               <refpurpose>Returns the geometric y coordinate upper left corner of a raster, column and row. Numbering of columns
                                        and rows starts at 1. </refpurpose>
                        </refnamediv>
                
index 1b99e23eafd73df765cf927e28368feebe77a3fb..8296bea288cd31aaac92ad64a9041741588fadc6 100644 (file)
@@ -26,7 +26,7 @@
           <para>Making spatial indexes 3D aware - in progress (Paul Ramsey, Mark Cave-Ayland)</para>
           <para>Topology support improved, documented, testing (Sandro Santilli / Faunalia for RT-SIGTA, Regina Obe, Andrea Peri)</para>
           <para>3D relationship support functions  (Nicklas Avén)</para>
-          <para>   ST_3DDistance, ST_3DClosestPoint, ST_3DIntersects, ST_3DShortestLine and more ..</para>
+          <para>   ST_3DDistance, ST_3DClosestPoint, ST_3DIntersects, ST_3DShortestLine and more...</para>
           <para>ST_Split (Sandro Santilli / Faunalia for RT-SIGTA)</para>
           <para>ST_isValidDetail (Sandro Santilli / Faunalia for RT-SIGTA)</para>
           <para>ST_MakeValid (Sandro Santilli / Faunalia for RT-SIGTA)</para>
         <para>Release date: 2008/12/15</para>
         <para>This release is a bug fix release to address a failure
         in ST_Force_Collection and related functions that critically
-        affects using Mapserver with LINE layers.</para>
+        affects using MapServer with LINE layers.</para>
       </sect1>
 
      <sect1>
index f5472f81da716b0a64da000a5d0745af0304ba28..63b44d3b9b287e282464b13ce1fb151258000015 100644 (file)
@@ -133,7 +133,7 @@ geometry = ST_GeometryFromText(text WKT, SRID);</programlisting>
                </listitem>
                
                <listitem>
-                   <para>MULTICURVE( (0 0, 5 5) ,CIRCULARSTRING(4 0, 4 4, 8 4) )</para>
+                   <para>MULTICURVE( (0 0, 5 5)CIRCULARSTRING(4 0, 4 4, 8 4) )</para>
                </listitem>
                
                <listitem>
index 66a884230b7b302b39d160dde0bf79f8336b5728..db625ebd2add0fb1ccb42df0f0f39a300b22c543 100644 (file)
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\r
-<!-- ********************************************************************\r
-        $Id$\r
-        ********************************************************************\r
-        Copyright 2010, Regina Obe\r
-        License: BSD\r
-        Purpose: This is an xsl transform that generates index listing of aggregate functions and mm /sql compliant functions xml section from reference_new.xml to then\r
-        be processed by doc book\r
-        ******************************************************************** -->\r
-       <xsl:output method="xml" indent="yes" encoding="utf-8" />\r
-\r
-       <!-- We deal only with the reference chapter -->\r
-       <xsl:template match="/">\r
-               <xsl:apply-templates select="/book/chapter[@id='reference' or @id='RT_references']" />\r
-       </xsl:template>\r
-\r
-       <xsl:template match="//chapter">\r
-       <chapter>\r
-               <title>PostGIS Special Functions Index</title>\r
-               <sect1 id="PostGIS_Aggregate_Functions">\r
-                       <title>PostGIS Aggregate Functions</title>\r
-                       <para>The functions given below are spatial aggregate functions provided with PostGIS that can be used just like any other sql aggregate function such as sum, average.</para>\r
-                       <itemizedlist>\r
-                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                       <xsl:for-each select='//refentry'>\r
-                               <xsl:sort select="@id"/>\r
-                               <xsl:variable name='comment'>\r
-                                       <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                               </xsl:variable>\r
-                               <xsl:variable name="refid">\r
-                                       <xsl:value-of select="@id" />\r
-                               </xsl:variable>\r
-\r
-                       <!-- For each function prototype if it takes a geometry set then catalog it as an aggregate function  -->\r
-                               <xsl:for-each select="refsynopsisdiv/funcsynopsis/funcprototype">\r
-                                       <xsl:choose>\r
-                                               <xsl:when test="contains(paramdef/type,' set') or contains(paramdef/type,'geography set') or contains(paramdef/type,'raster set')">\r
-                                                        <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>\r
-                                               </xsl:when>\r
-                                       </xsl:choose>\r
-                               </xsl:for-each>\r
-                       </xsl:for-each>\r
-                       </itemizedlist>\r
-               </sect1>\r
-\r
-               <sect1 id="PostGIS_SQLMM_Functions">\r
-                       <title>PostGIS SQL-MM Compliant Functions</title>\r
-                       <para>The functions given below are PostGIS functions that conform to the SQL/MM 3 standard</para>\r
-                       <note>\r
-                         <para>SQL-MM defines the default SRID of all geometry constructors as 0.\r
-                         PostGIS uses a default SRID of -1.</para>\r
-                       </note>\r
-                               <itemizedlist>\r
-                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                               <xsl:for-each select='//refentry'>\r
-                                       <xsl:sort select="@id"/>\r
-                                       <xsl:variable name='comment'>\r
-                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refid">\r
-                                               <xsl:value-of select="@id" />\r
-                                       </xsl:variable>\r
-\r
-                       <!-- For each section if there is note that it implements SQL/MM catalog it -->\r
-                                               <xsl:for-each select="refsection">\r
-                                                       <xsl:for-each select="para">\r
-                                                               <xsl:choose>\r
-                                                                       <xsl:when test="contains(.,'implements the SQL/MM')">\r
-                                                                               <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /> <xsl:value-of select="." /></simpara></listitem>\r
-                                                                       </xsl:when>\r
-                                                               </xsl:choose>\r
-                                                       </xsl:for-each>\r
-                                               </xsl:for-each>\r
-                               </xsl:for-each>\r
-                               </itemizedlist>\r
-               </sect1>\r
-\r
-               <sect1 id="PostGIS_GeographyFunctions">\r
-                       <title>PostGIS Geography Support Functions</title>\r
-                       <para>The functions and operators given below are PostGIS functions/operators that take as input or return as output a <link linkend="PostGIS_Geography">geography</link> data type object.</para>\r
-                       <note><para>Functions with a (T) are not native geodetic functions, and use a ST_Transform call to and from geometry to do the operation.  As a result, they may not behave as expected when going over dateline, poles, \r
-                               and for large geometries or geometry pairs that cover more than one UTM zone. Basic tranform - (favoring UTM, Lambert Azimuthal (North/South), and falling back on mercator in worst case scenario)</para></note>\r
-                               <itemizedlist>\r
-                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                               <xsl:for-each select='//refentry'>\r
-                                       <xsl:sort select="@id"/>\r
-                                       <xsl:variable name='comment'>\r
-                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refid">\r
-                                               <xsl:value-of select="@id" />\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refname">\r
-                                               <xsl:value-of select="refnamediv/refname" />\r
-                                       </xsl:variable>\r
-\r
-                       <!-- If at least one proto function accepts or returns a geography -->\r
-                                       <xsl:choose>\r
-                                               <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')">\r
-                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>\r
-                                               </xsl:when>\r
-                                       </xsl:choose>\r
-                               </xsl:for-each>\r
-                               </itemizedlist>\r
-               </sect1>\r
-\r
-               <sect1 id="PostGIS_RasterFunctions">\r
-                       <title>PostGIS Raster Support Functions</title>\r
-                       <para>The functions and operators given below are PostGIS functions/operators that take as input or return as output a <xref linkend="raster" /> data type object. Listed\r
-                       in alphabetical order.</para>\r
-                               <itemizedlist>\r
-                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                               <xsl:for-each select='//refentry'>\r
-                                       <xsl:sort select="@id"/>\r
-                                       <xsl:variable name='comment'>\r
-                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refid">\r
-                                               <xsl:value-of select="@id" />\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refname">\r
-                                               <xsl:value-of select="refnamediv/refname" />\r
-                                       </xsl:variable>\r
-\r
-                       <!-- If at least one proto function accepts or returns a geography -->\r
-                                       <xsl:choose>\r
-                                               <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'raster') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'raster')">\r
-                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>\r
-                                               </xsl:when>\r
-                                       </xsl:choose>\r
-                               </xsl:for-each>\r
-                               </itemizedlist>\r
-               </sect1>\r
-       \r
-               \r
-               <sect1 id="PostGIS_Geometry_DumpFunctions">\r
-                       <title>PostGIS Geometry / Geography / Raster Dump Functions</title>\r
-                       <para>The functions given below are PostGIS functions that take as input or return as output a set of or single <link linkend="geometry_dump">geometry_dump</link> or  <link linkend="geomval">geomval</link> data type object.</para>\r
-                               <itemizedlist>\r
-                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                               <xsl:for-each select='//refentry'>\r
-                                       <xsl:sort select="@id"/>\r
-                                       <xsl:variable name='comment'>\r
-                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refid">\r
-                                               <xsl:value-of select="@id" />\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refname">\r
-                                               <xsl:value-of select="refnamediv/refname" />\r
-                                       </xsl:variable>\r
-\r
-                       <!-- If at least one proto function accepts or returns a geography -->\r
-                                       <xsl:choose>\r
-                                               <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'geometry_dump') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geometry_dump') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geomval')">\r
-                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>\r
-                                               </xsl:when>\r
-                                       </xsl:choose>\r
-                               </xsl:for-each>\r
-                               </itemizedlist>\r
-               </sect1>\r
-               \r
-               <sect1 id="PostGIS_BoxFunctions">\r
-                       <title>PostGIS Box Functions</title>\r
-                       <para>The functions given below are PostGIS functions that take as input or return as output the box* family of PostGIS spatial types.\r
-                               The box family of types consists of <link linkend="box2d">box2d</link>, <link linkend="box3d">box3d</link>, <link linkend="box3d_extent">box3d_extent</link> </para>\r
-                               <itemizedlist>\r
-                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                               <xsl:for-each select='//refentry'>\r
-                                       <xsl:sort select="@id"/>\r
-                                       <xsl:variable name='comment'>\r
-                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refid">\r
-                                               <xsl:value-of select="@id" />\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refname">\r
-                                               <xsl:value-of select="refnamediv/refname" />\r
-                                       </xsl:variable>\r
-\r
-                       <!-- If at least one proto function accepts or returns a geography -->\r
-                                       <xsl:choose>\r
-                                               <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'box') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'box')">\r
-                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>\r
-                                               </xsl:when>\r
-                                       </xsl:choose>\r
-                               </xsl:for-each>\r
-                               </itemizedlist>\r
-               </sect1>\r
-\r
-               <sect1 id="PostGIS_3D_Functions">\r
-                       <title>PostGIS Functions that support 3D</title>\r
-                       <para>The functions given below are PostGIS functions that do not throw away the Z-Index.</para>\r
-                               <itemizedlist>\r
-                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                               <xsl:for-each select='//refentry'>\r
-                                       <xsl:sort select="@id"/>\r
-                                       <xsl:variable name='comment'>\r
-                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refid">\r
-                                               <xsl:value-of select="@id" />\r
-                                       </xsl:variable>\r
-\r
-                       <!-- For each section if there is note that it supports 3d catalog it -->\r
-                                               <xsl:for-each select="refsection">\r
-                                                       <xsl:for-each select="para">\r
-                                                               <xsl:choose>\r
-                                                                       <xsl:when test="contains(.,'This function supports 3d')">\r
-                                                                               <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>\r
-                                                                       </xsl:when>\r
-                                                               </xsl:choose>\r
-                                                       </xsl:for-each>\r
-                                               </xsl:for-each>\r
-                               </xsl:for-each>\r
-                               </itemizedlist>\r
-               </sect1>\r
-\r
-               <sect1 id="PostGIS_Curved_GeometryFunctions">\r
-                       <title>PostGIS Curved Geometry Support Functions</title>\r
-                       <para>The functions given below are PostGIS functions that can use CIRCULARSTRING, CURVEDPOLYGON, and other curved geometry types</para>\r
-                               <itemizedlist>\r
-                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                               <xsl:for-each select='//refentry'>\r
-                                       <xsl:sort select="@id"/>\r
-                                       <xsl:variable name='comment'>\r
-                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refid">\r
-                                               <xsl:value-of select="@id" />\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refname">\r
-                                               <xsl:value-of select="refnamediv/refname" />\r
-                                       </xsl:variable>\r
-\r
-                       <!-- For each section if there is note that it implements Circular String catalog it -->\r
-                                               <xsl:for-each select="refsection">\r
-                                                       <xsl:for-each select="para">\r
-                                                               <xsl:choose>\r
-                                                                       <xsl:when test="contains(.,'supports Circular Strings')">\r
-                                                                               <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>\r
-                                                                       </xsl:when>\r
-                                                               </xsl:choose>\r
-                                                       </xsl:for-each>\r
-                                               </xsl:for-each>\r
-                               </xsl:for-each>\r
-                               </itemizedlist>\r
-               </sect1>\r
-               \r
-               <sect1 id="PostGIS_PS_GeometryFunctions">\r
-                       <title>PostGIS Polyhedral Surface Support Functions</title>\r
-                       <para>The functions given below are PostGIS functions that can use POLYHEDRALSURFACE, POLYHEDRALSURFACEM geometries</para>\r
-                               <itemizedlist>\r
-                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                               <xsl:for-each select='//refentry'>\r
-                                       <xsl:sort select="@id"/>\r
-                                       <xsl:variable name='comment'>\r
-                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refid">\r
-                                               <xsl:value-of select="@id" />\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refname">\r
-                                               <xsl:value-of select="refnamediv/refname" />\r
-                                       </xsl:variable>\r
-\r
-                       <!-- For each section if there is note that it supports Polyhedral surfaces catalog it -->\r
-                                               <xsl:for-each select="refsection">\r
-                                                       <xsl:for-each select="para">\r
-                                                               <xsl:choose>\r
-                                                                       <xsl:when test="contains(.,'supports Polyhedral')">\r
-                                                                               <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>\r
-                                                                       </xsl:when>\r
-                                                               </xsl:choose>\r
-                                                       </xsl:for-each>\r
-                                               </xsl:for-each>\r
-                               </xsl:for-each>\r
-                               </itemizedlist>\r
-               </sect1>\r
-\r
-               <sect1 id="PostGIS_TypeFunctionMatrix">\r
-                       <xsl:variable name='matrix_checkmark'><![CDATA[<inlinemediaobject><imageobject><imagedata fileref='images/matrix_checkmark.png' /></imageobject></inlinemediaobject>]]></xsl:variable>\r
-                       <xsl:variable name='matrix_transform'><![CDATA[<inlinemediaobject><imageobject><imagedata fileref='images/matrix_transform.png' /></imageobject></inlinemediaobject>]]></xsl:variable>\r
-                       <xsl:variable name='matrix_autocast'><![CDATA[<inlinemediaobject><imageobject><imagedata fileref='images/matrix_autocast.png' /></imageobject></inlinemediaobject>]]></xsl:variable>\r
-                       <title>PostGIS Function Support Matrix</title>\r
-\r
-                       <para>Below is an alphabetical listing of spatial specific functions in PostGIS and the kinds of spatial\r
-                               types they work with or OGC/SQL compliance they try to conform to.</para>\r
-                       <para><itemizedlist>\r
-                               <listitem><simpara>A <xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/> means the function works with the type or subtype natively.</simpara></listitem>\r
-                               <listitem><simpara>A <xsl:value-of select="$matrix_transform" disable-output-escaping="yes"/> means it works but with a transform cast built-in using cast to geometry, transform to a "best srid" spatial ref and then cast back. Results may not be as expected for large areas or areas at poles \r
-                                               and may accumulate floating point junk.</simpara></listitem>\r
-                               <listitem><simpara>A <xsl:value-of select="$matrix_autocast" disable-output-escaping="yes"/> means the function works with the type because of a auto-cast to another such as to box3d rather than direct type support.</simpara></listitem>\r
-                               <listitem><simpara>geom - Basic 2D geometry support (x,y).</simpara></listitem>\r
-                               <listitem><simpara>geog - Basic 2D geography support (x,y).</simpara></listitem>\r
-                               <listitem><simpara>2.5D - basic 2D geometries in 3 D/4D space (has Z or M coord).</simpara></listitem>\r
-                               <listitem><simpara>PS - Polyhedral surfaces</simpara></listitem>\r
-                               <listitem><simpara>T - Triangles and Triangulated Irregular Network surfaces (TIN)</simpara></listitem>\r
-                               </itemizedlist>\r
-                       </para>\r
-                               \r
-                       <para>\r
-                               <informaltable frame='all'>\r
-                                       <tgroup cols='8' align='left' colsep='1' rowsep='1'>\r
-                                               <colspec colname='function' align='left'/>\r
-                                               <colspec colname='geometry' align='center'/>\r
-                                               <colspec colname='geography' align='center'/>\r
-                                               <colspec colname='25D' align='center'/>\r
-                                               <colspec colname='Curves' align='center'/>\r
-                                               <colspec colname='SQLMM' align='center' />\r
-                                               <colspec colname='PS' align='center' />\r
-                                               <colspec colname='T' align='center' />\r
-                                               <thead>\r
-                                                 <row>\r
-                                                       <entry>Function</entry>\r
-                                                       <entry>geom</entry>\r
-                                                       <entry>geog</entry>\r
-                                                       <entry>2.5D</entry>\r
-                                                       <entry>Curves</entry>\r
-                                                       <entry>SQL MM</entry>\r
-                                                       <entry>PS</entry>\r
-                                                       <entry>T</entry>\r
-                                                 </row>\r
-                                               </thead>\r
-                                               <tbody>\r
-                                               <!-- Exclude PostGIS types ,management functions, long transaction support, or exceptional functions from consideration  -->\r
-                                               <!-- leaving out operators in an effor to try to fit on one page -->\r
-                                               <xsl:for-each select="sect1[not(@id='PostGIS_Types' or @id='Management_Functions' or @id='Long_Transactions_Support' or @id='Exceptional_Functions')]/refentry">\r
-                                                       <xsl:sort select="@id"/>\r
-                                                       <xsl:variable name='comment'>\r
-                                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                                       </xsl:variable>\r
-                                                       <xsl:variable name="refid">\r
-                                                               <xsl:value-of select="@id" />\r
-                                                       </xsl:variable>\r
-                                                       <xsl:variable name="refname">\r
-                                                               <xsl:value-of select="refnamediv/refname" />\r
-                                                       </xsl:variable>\r
-                       \r
-                                                       <row>\r
-                                                               <!-- Display name of function and link to it -->\r
-                                                               <entry><link linkend="{$refid}"><xsl:value-of select="$refname" /></link></entry>\r
-                                                               <!-- If at least one proto function accepts or returns a geometry -->\r
-                                                               <xsl:choose>\r
-                                                                       <!-- direct support -->\r
-                                                                       <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'geometry') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geometry')">\r
-                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>\r
-                                                                       </xsl:when>\r
-                                                                       <!-- support via autocast -->\r
-                                                                       <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'box') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'box')">\r
-                                                                               <entry><xsl:value-of select="$matrix_autocast" disable-output-escaping="yes"/></entry>\r
-                                                                       </xsl:when>\r
-                                                                       <!-- no support -->\r
-                                                                       <xsl:otherwise>\r
-                                                                               <entry></entry>\r
-                                                                       </xsl:otherwise>\r
-                                                               </xsl:choose>\r
-                                                               <!-- If at least one proto function accepts or returns a geography -->\r
-                                                               <xsl:choose>\r
-                                                                       <!-- Support via geometry transform hack -->\r
-                                                                       <xsl:when test="(contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')) and contains($comment,'(T)')">\r
-                                                                               <entry><xsl:value-of select="$matrix_transform" disable-output-escaping="yes"/></entry>\r
-                                                                       </xsl:when>\r
-                                                                       <!-- direct support -->\r
-                                                                       <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')">\r
-                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>\r
-                                                                       </xsl:when>\r
-                                                                       <!-- no support -->\r
-                                                                       <xsl:otherwise>\r
-                                                                               <entry></entry>\r
-                                                                       </xsl:otherwise>\r
-                                                               </xsl:choose>\r
-                                                               \r
-                                                               <!-- If at least one paragraph contains support 3d -->\r
-                                                               <xsl:choose>\r
-                                                                       <!-- supports -->\r
-                                                                       <xsl:when test="contains(.,'This function supports 3d')">\r
-                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>\r
-                                                                       </xsl:when>\r
-                                                                       <!-- no support -->\r
-                                                                       <xsl:otherwise>\r
-                                                                               <entry></entry>\r
-                                                                       </xsl:otherwise>\r
-                                                               </xsl:choose>\r
-                                                               <!-- Support for Curve -->\r
-                                                               <xsl:choose>\r
-                                                                       <!-- supports -->\r
-                                                                       <xsl:when test="contains(.,'supports Circular Strings')">\r
-                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>\r
-                                                                       </xsl:when>\r
-                                                                       <!-- no support -->\r
-                                                                       <xsl:otherwise>\r
-                                                                               <entry></entry>\r
-                                                                       </xsl:otherwise>\r
-                                                               </xsl:choose>   \r
-                                                               <!-- SQL MM compliance -->\r
-                                                               <xsl:choose>\r
-                                                                       <!-- supports -->\r
-                                                                       <xsl:when test="contains(.,'implements the SQL/MM')">\r
-                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>\r
-                                                                       </xsl:when>\r
-                                                                       <!-- no support -->\r
-                                                                       <xsl:otherwise>\r
-                                                                               <entry></entry>\r
-                                                                       </xsl:otherwise>\r
-                                                               </xsl:choose>\r
-                                                       <!-- Polyhedral surface support -->\r
-                                                               <xsl:choose>\r
-                                                                       <!-- supports -->\r
-                                                                       <xsl:when test="contains(.,'Polyhedral')">\r
-                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>\r
-                                                                       </xsl:when>\r
-                                                                       <!-- no support -->\r
-                                                                       <xsl:otherwise>\r
-                                                                               <entry></entry>\r
-                                                                       </xsl:otherwise>\r
-                                                               </xsl:choose>\r
-                                                       <!-- Triangle and TIN surface support -->\r
-                                                               <xsl:choose>\r
-                                                                       <!-- supports -->\r
-                                                                       <xsl:when test="contains(.,'Triang')">\r
-                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>\r
-                                                                       </xsl:when>\r
-                                                                       <!-- no support -->\r
-                                                                       <xsl:otherwise>\r
-                                                                               <entry></entry>\r
-                                                                       </xsl:otherwise>\r
-                                                               </xsl:choose>\r
-                                                       </row>\r
-                                               </xsl:for-each>\r
-                                               </tbody>\r
-                                       </tgroup>\r
-               </informaltable>        \r
-               </para>\r
-          </sect1>\r
-\r
-               <sect1 id="NewFunctions">\r
-                       <title>New, Enhanced or changed PostGIS Functions</title>\r
-                       <sect2 id="NewFunctions_2_0">\r
-                               <title>PostGIS Functions new, behavior changed, or enhanced in 2.0</title>\r
-                               <para>The functions given below are PostGIS functions that were added, enhanced, or have breaking changes in 2.0 releases.</para>\r
-                               <para>New geometry types: TIN and Polyhedral surfaces was introduced in 2.0</para>\r
-                               <note><para>Greatly improved support for Topology.  Please refer to <xref linkend="Topology" /> for more details.</para></note>\r
-                               <note><para>In PostGIS 2.0, raster type and raster functionality has been integrated.  There are way too many new raster functions to list here and all are new so \r
-                                       please refer to <xref linkend="RT_reference" /> for more details of the raster functions available.</para></note>\r
-                               <itemizedlist>\r
-                               <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                                       <xsl:for-each select='//refentry'>\r
-                                               <xsl:sort select="@id"/>\r
-                                               <xsl:variable name='comment'>\r
-                                                       <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                               </xsl:variable>\r
-                                               <xsl:variable name="refid">\r
-                                                       <xsl:value-of select="@id" />\r
-                                               </xsl:variable>\r
-                                               \r
-                                               <xsl:variable name="refname">\r
-                                                       <xsl:value-of select="refnamediv/refname" />\r
-                                               </xsl:variable>\r
-\r
-\r
-                               <!-- For each section if there is note about availability in this version -->\r
-                                                       <xsl:for-each select="refsection">\r
-                                                               <xsl:for-each select="para">\r
-                                                                       <xsl:choose>\r
-                                                                               <xsl:when test="contains(.,'Availability: 2.0')">\r
-                                                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="." /><xsl:text> </xsl:text> <xsl:value-of select="$comment" /></simpara></listitem>\r
-                                                                               </xsl:when>\r
-                                                                       </xsl:choose>\r
-                                                               </xsl:for-each>\r
-                                                       </xsl:for-each>\r
-                                       </xsl:for-each>\r
-                               </itemizedlist>\r
-                               \r
-                               <para>The functions given below are PostGIS functions that are enhanced in PostGIS 2.0.</para>\r
-                               <itemizedlist>\r
-                               <!-- Pull out the purpose section for each ref entry   -->\r
-                                       <xsl:for-each select='//refentry'>\r
-                                               <xsl:sort select="@id"/>\r
-                                               <xsl:variable name="refid">\r
-                                                       <xsl:value-of select="@id" />\r
-                                               </xsl:variable>\r
-                                               \r
-                                               <xsl:variable name="refname">\r
-                                                       <xsl:value-of select="refnamediv/refname" />\r
-                                               </xsl:variable>\r
-                               <!-- For each section if there is note about enhanced in this version -->\r
-                                                       <xsl:for-each select="refsection">\r
-                                                               <xsl:for-each select="para">\r
-                                                                       <xsl:choose>\r
-                                                                               <xsl:when test="contains(.,'Enhanced: 2.0')">\r
-                                                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="." /></simpara></listitem>\r
-                                                                               </xsl:when>\r
-                                                                       </xsl:choose>\r
-                                                               </xsl:for-each>\r
-                                                       </xsl:for-each>\r
-                                       </xsl:for-each>\r
-                               </itemizedlist>\r
-                               \r
-                               <para>The functions given below are PostGIS functions that have changed behavior in PostGIS 2.0.</para>\r
-                               <note><para>Most deprecated functions have been removed.  These are functions that haven't been documented since 1.2\r
-                                       or some internal functions that were never documented.  If you are using a function that you don't see documented,\r
-                                       it's probably deprecated, about to be deprecated, or internal and should be avoided.</para></note>\r
-                               <itemizedlist>\r
-                               <!-- Pull out the purpose section for each ref entry   -->\r
-                                       <xsl:for-each select='//refentry'>\r
-                                               <xsl:sort select="@id"/>\r
-                                               <xsl:variable name="refid">\r
-                                                       <xsl:value-of select="@id" />\r
-                                               </xsl:variable>\r
-                                               \r
-                                               <xsl:variable name="refname">\r
-                                                       <xsl:value-of select="refnamediv/refname" />\r
-                                               </xsl:variable>\r
-                               <!-- For each section if there is note about enhanced in this version -->\r
-                                                       <xsl:for-each select="refsection">\r
-                                                               <xsl:for-each select="para">\r
-                                                                       <xsl:choose>\r
-                                                                               <xsl:when test="contains(.,'Changed: 2.0')">\r
-                                                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="." /></simpara></listitem>\r
-                                                                               </xsl:when>\r
-                                                                       </xsl:choose>\r
-                                                               </xsl:for-each>\r
-                                                       </xsl:for-each>\r
-                                       </xsl:for-each>\r
-                               </itemizedlist>\r
-                       </sect2>\r
-                       <sect2 id="NewFunctions_1_5">\r
-                               <title>PostGIS Functions new, behavior changed, or enhanced in 1.5</title>\r
-                               <para>The functions given below are PostGIS functions that were introduced or enhanced in this minor release.</para>\r
-                               <itemizedlist>\r
-                               <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                                       <xsl:for-each select='//refentry'>\r
-                                               <xsl:sort select="@id"/>\r
-                                               <xsl:variable name='comment'>\r
-                                                       <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                               </xsl:variable>\r
-                                               <xsl:variable name="refid">\r
-                                                       <xsl:value-of select="@id" />\r
-                                               </xsl:variable>\r
-                                               \r
-                                               <xsl:variable name="refname">\r
-                                                       <xsl:value-of select="refnamediv/refname" />\r
-                                               </xsl:variable>\r
-\r
-\r
-                               <!-- For each section if there is note about availability in this version -->\r
-                                                       <xsl:for-each select="refsection">\r
-                                                               <xsl:for-each select="para">\r
-                                                                       <xsl:choose>\r
-                                                                               <xsl:when test="contains(.,'Availability: 1.5')">\r
-                                                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="." /><xsl:text> </xsl:text> <xsl:value-of select="$comment" /></simpara></listitem>\r
-                                                                               </xsl:when>\r
-                                                                       </xsl:choose>\r
-                                                               </xsl:for-each>\r
-                                                       </xsl:for-each>\r
-                                       </xsl:for-each>\r
-                               </itemizedlist>\r
-                       </sect2>\r
-                       <sect2 id="NewFunctions_1_4">\r
-                               <title>PostGIS Functions new, behavior changed, or enhanced in 1.4</title>\r
-                               <para>The functions given below are PostGIS functions that were introduced or enhanced in the 1.4 release.</para>\r
-                               <itemizedlist>\r
-                               <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                                       <xsl:for-each select='//refentry'>\r
-                                               <xsl:sort select="@id"/>\r
-                                               <xsl:variable name='comment'>\r
-                                                       <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                               </xsl:variable>\r
-                                               <xsl:variable name="refid">\r
-                                                       <xsl:value-of select="@id" />\r
-                                               </xsl:variable>\r
-\r
-                               <!-- For each section if there is note about availability in this version -->\r
-                                                       <xsl:for-each select="refsection">\r
-                                                               <xsl:for-each select="para|note">\r
-                                                                       <xsl:choose>\r
-                                                                               <xsl:when test="contains(.,'Availability: 1.4')">\r
-                                                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /> <xsl:text> </xsl:text><xsl:value-of select="." /></simpara></listitem>\r
-                                                                               </xsl:when>\r
-                                                                       </xsl:choose>\r
-                                                               </xsl:for-each>\r
-                                                       </xsl:for-each>\r
-                                       </xsl:for-each>\r
-                               </itemizedlist>\r
-                       </sect2>\r
-                       <sect2 id="NewFunctions_1_3">\r
-                               <title>PostGIS Functions new in 1.3</title>\r
-                               <para>The functions given below are PostGIS functions that were introduced in the 1.3 release.</para>\r
-                               <itemizedlist>\r
-                               <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
-                               <xsl:for-each select='//refentry'>\r
-                                       <xsl:sort select="@id"/>\r
-                                       <xsl:variable name='comment'>\r
-                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
-                                       </xsl:variable>\r
-                                       <xsl:variable name="refid">\r
-                                               <xsl:value-of select="@id" />\r
-                                       </xsl:variable>\r
-\r
-                               <!-- For each section if there is note about availability in this version -->\r
-                                               <xsl:for-each select="refsection">\r
-                                                       <xsl:for-each select="para">\r
-                                                               <xsl:choose>\r
-                                                                       <xsl:when test="contains(.,'Availability: 1.3')">\r
-                                                                               <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /> <xsl:text> </xsl:text><xsl:value-of select="." /></simpara></listitem>\r
-                                                                       </xsl:when>\r
-                                                               </xsl:choose>\r
-                                                       </xsl:for-each>\r
-                                               </xsl:for-each>\r
-                               </xsl:for-each>\r
-                               </itemizedlist>\r
-                       </sect2>\r
-               </sect1>\r
-\r
-       </chapter>\r
-       </xsl:template>\r
-\r
-       <!--macro to pull out function parameter names so we can provide a pretty arg list prefix for each function -->\r
-       <xsl:template name="listparams">\r
-               <xsl:param name="func" />\r
-               <xsl:for-each select="$func">\r
-                       <xsl:if test="count(paramdef/parameter) &gt; 0">args: </xsl:if>\r
-                       <xsl:for-each select="paramdef">\r
-                               <xsl:choose>\r
-                                       <xsl:when test="count(parameter) &gt; 0">\r
-                                               <xsl:value-of select="parameter" />\r
-                                       </xsl:when>\r
-                               </xsl:choose>\r
-                               <xsl:if test="position()&lt;last()"><xsl:text>, </xsl:text></xsl:if>\r
-                       </xsl:for-each>\r
-                       <xsl:if test="count(paramdef/parameter) &gt; 0"> - </xsl:if>\r
-               </xsl:for-each>\r
-       </xsl:template>\r
-\r
-</xsl:stylesheet>\r
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<!-- ********************************************************************
+        $Id$
+        ********************************************************************
+        Copyright 2010, Regina Obe
+        License: BSD
+        Purpose: This is an xsl transform that generates index listing of aggregate functions and mm /sql compliant functions xml section from reference_new.xml to then
+        be processed by doc book
+        ******************************************************************** -->
+       <xsl:output method="xml" indent="yes" encoding="utf-8" />
+
+       <!-- We deal only with the reference chapter -->
+       <xsl:template match="/">
+               <xsl:apply-templates select="/book/chapter[@id='reference' or @id='RT_references']" />
+       </xsl:template>
+
+       <xsl:template match="//chapter">
+       <chapter>
+               <title>PostGIS Special Functions Index</title>
+               <sect1 id="PostGIS_Aggregate_Functions">
+                       <title>PostGIS Aggregate Functions</title>
+                       <para>The functions given below are spatial aggregate functions provided with PostGIS that can be used just like any other sql aggregate function such as sum, average.</para>
+                       <itemizedlist>
+                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                       <xsl:for-each select='//refentry'>
+                               <xsl:sort select="@id"/>
+                               <xsl:variable name='comment'>
+                                       <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                               </xsl:variable>
+                               <xsl:variable name="refid">
+                                       <xsl:value-of select="@id" />
+                               </xsl:variable>
+
+                       <!-- For each function prototype if it takes a geometry set then catalog it as an aggregate function  -->
+                               <xsl:for-each select="refsynopsisdiv/funcsynopsis/funcprototype">
+                                       <xsl:choose>
+                                               <xsl:when test="contains(paramdef/type,' set') or contains(paramdef/type,'geography set') or contains(paramdef/type,'raster set')">
+                                                        <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>
+                                               </xsl:when>
+                                       </xsl:choose>
+                               </xsl:for-each>
+                       </xsl:for-each>
+                       </itemizedlist>
+               </sect1>
+
+               <sect1 id="PostGIS_SQLMM_Functions">
+                       <title>PostGIS SQL-MM Compliant Functions</title>
+                       <para>The functions given below are PostGIS functions that conform to the SQL/MM 3 standard</para>
+                       <note>
+                         <para>SQL-MM defines the default SRID of all geometry constructors as 0.
+                         PostGIS uses a default SRID of -1.</para>
+                       </note>
+                               <itemizedlist>
+                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                               <xsl:for-each select='//refentry'>
+                                       <xsl:sort select="@id"/>
+                                       <xsl:variable name='comment'>
+                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                       </xsl:variable>
+                                       <xsl:variable name="refid">
+                                               <xsl:value-of select="@id" />
+                                       </xsl:variable>
+
+                       <!-- For each section if there is note that it implements SQL/MM catalog it -->
+                                               <xsl:for-each select="refsection">
+                                                       <xsl:for-each select="para">
+                                                               <xsl:choose>
+                                                                       <xsl:when test="contains(.,'implements the SQL/MM')">
+                                                                               <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /> <xsl:value-of select="." /></simpara></listitem>
+                                                                       </xsl:when>
+                                                               </xsl:choose>
+                                                       </xsl:for-each>
+                                               </xsl:for-each>
+                               </xsl:for-each>
+                               </itemizedlist>
+               </sect1>
+
+               <sect1 id="PostGIS_GeographyFunctions">
+                       <title>PostGIS Geography Support Functions</title>
+                       <para>The functions and operators given below are PostGIS functions/operators that take as input or return as output a <link linkend="PostGIS_Geography">geography</link> data type object.</para>
+                       <note><para>Functions with a (T) are not native geodetic functions, and use a ST_Transform call to and from geometry to do the operation.  As a result, they may not behave as expected when going over dateline, poles, 
+                               and for large geometries or geometry pairs that cover more than one UTM zone. Basic tranform - (favoring UTM, Lambert Azimuthal (North/South), and falling back on mercator in worst case scenario)</para></note>
+                               <itemizedlist>
+                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                               <xsl:for-each select='//refentry'>
+                                       <xsl:sort select="@id"/>
+                                       <xsl:variable name='comment'>
+                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                       </xsl:variable>
+                                       <xsl:variable name="refid">
+                                               <xsl:value-of select="@id" />
+                                       </xsl:variable>
+                                       <xsl:variable name="refname">
+                                               <xsl:value-of select="refnamediv/refname" />
+                                       </xsl:variable>
+
+                       <!-- If at least one proto function accepts or returns a geography -->
+                                       <xsl:choose>
+                                               <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')">
+                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>
+                                               </xsl:when>
+                                       </xsl:choose>
+                               </xsl:for-each>
+                               </itemizedlist>
+               </sect1>
+
+               <sect1 id="PostGIS_RasterFunctions">
+                       <title>PostGIS Raster Support Functions</title>
+                       <para>The functions and operators given below are PostGIS functions/operators that take as input or return as output a <xref linkend="raster" /> data type object. Listed
+                       in alphabetical order.</para>
+                               <itemizedlist>
+                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                               <xsl:for-each select='//refentry'>
+                                       <xsl:sort select="@id"/>
+                                       <xsl:variable name='comment'>
+                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                       </xsl:variable>
+                                       <xsl:variable name="refid">
+                                               <xsl:value-of select="@id" />
+                                       </xsl:variable>
+                                       <xsl:variable name="refname">
+                                               <xsl:value-of select="refnamediv/refname" />
+                                       </xsl:variable>
+
+                       <!-- If at least one proto function accepts or returns a geography -->
+                                       <xsl:choose>
+                                               <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'raster') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'raster')">
+                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>
+                                               </xsl:when>
+                                       </xsl:choose>
+                               </xsl:for-each>
+                               </itemizedlist>
+               </sect1>
+       
+               
+               <sect1 id="PostGIS_Geometry_DumpFunctions">
+                       <title>PostGIS Geometry / Geography / Raster Dump Functions</title>
+                       <para>The functions given below are PostGIS functions that take as input or return as output a set of or single <link linkend="geometry_dump">geometry_dump</link> or  <link linkend="geomval">geomval</link> data type object.</para>
+                               <itemizedlist>
+                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                               <xsl:for-each select='//refentry'>
+                                       <xsl:sort select="@id"/>
+                                       <xsl:variable name='comment'>
+                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                       </xsl:variable>
+                                       <xsl:variable name="refid">
+                                               <xsl:value-of select="@id" />
+                                       </xsl:variable>
+                                       <xsl:variable name="refname">
+                                               <xsl:value-of select="refnamediv/refname" />
+                                       </xsl:variable>
+
+                       <!-- If at least one proto function accepts or returns a geography -->
+                                       <xsl:choose>
+                                               <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'geometry_dump') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geometry_dump') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geomval')">
+                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>
+                                               </xsl:when>
+                                       </xsl:choose>
+                               </xsl:for-each>
+                               </itemizedlist>
+               </sect1>
+               
+               <sect1 id="PostGIS_BoxFunctions">
+                       <title>PostGIS Box Functions</title>
+                       <para>The functions given below are PostGIS functions that take as input or return as output the box* family of PostGIS spatial types.
+                               The box family of types consists of <link linkend="box2d">box2d</link>, <link linkend="box3d">box3d</link>, <link linkend="box3d_extent">box3d_extent</link> </para>
+                               <itemizedlist>
+                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                               <xsl:for-each select='//refentry'>
+                                       <xsl:sort select="@id"/>
+                                       <xsl:variable name='comment'>
+                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                       </xsl:variable>
+                                       <xsl:variable name="refid">
+                                               <xsl:value-of select="@id" />
+                                       </xsl:variable>
+                                       <xsl:variable name="refname">
+                                               <xsl:value-of select="refnamediv/refname" />
+                                       </xsl:variable>
+
+                       <!-- If at least one proto function accepts or returns a geography -->
+                                       <xsl:choose>
+                                               <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'box') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'box')">
+                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>
+                                               </xsl:when>
+                                       </xsl:choose>
+                               </xsl:for-each>
+                               </itemizedlist>
+               </sect1>
+
+               <sect1 id="PostGIS_3D_Functions">
+                       <title>PostGIS Functions that support 3D</title>
+                       <para>The functions given below are PostGIS functions that do not throw away the Z-Index.</para>
+                               <itemizedlist>
+                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                               <xsl:for-each select='//refentry'>
+                                       <xsl:sort select="@id"/>
+                                       <xsl:variable name='comment'>
+                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                       </xsl:variable>
+                                       <xsl:variable name="refid">
+                                               <xsl:value-of select="@id" />
+                                       </xsl:variable>
+
+                       <!-- For each section if there is note that it supports 3d catalog it -->
+                                               <xsl:for-each select="refsection">
+                                                       <xsl:for-each select="para">
+                                                               <xsl:choose>
+                                                                       <xsl:when test="contains(.,'This function supports 3d')">
+                                                                               <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>
+                                                                       </xsl:when>
+                                                               </xsl:choose>
+                                                       </xsl:for-each>
+                                               </xsl:for-each>
+                               </xsl:for-each>
+                               </itemizedlist>
+               </sect1>
+
+               <sect1 id="PostGIS_Curved_GeometryFunctions">
+                       <title>PostGIS Curved Geometry Support Functions</title>
+                       <para>The functions given below are PostGIS functions that can use CIRCULARSTRING, CURVEDPOLYGON, and other curved geometry types</para>
+                               <itemizedlist>
+                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                               <xsl:for-each select='//refentry'>
+                                       <xsl:sort select="@id"/>
+                                       <xsl:variable name='comment'>
+                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                       </xsl:variable>
+                                       <xsl:variable name="refid">
+                                               <xsl:value-of select="@id" />
+                                       </xsl:variable>
+                                       <xsl:variable name="refname">
+                                               <xsl:value-of select="refnamediv/refname" />
+                                       </xsl:variable>
+
+                       <!-- For each section if there is note that it implements Circular String catalog it -->
+                                               <xsl:for-each select="refsection">
+                                                       <xsl:for-each select="para">
+                                                               <xsl:choose>
+                                                                       <xsl:when test="contains(.,'supports Circular Strings')">
+                                                                               <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>
+                                                                       </xsl:when>
+                                                               </xsl:choose>
+                                                       </xsl:for-each>
+                                               </xsl:for-each>
+                               </xsl:for-each>
+                               </itemizedlist>
+               </sect1>
+               
+               <sect1 id="PostGIS_PS_GeometryFunctions">
+                       <title>PostGIS Polyhedral Surface Support Functions</title>
+                       <para>The functions given below are PostGIS functions that can use POLYHEDRALSURFACE, POLYHEDRALSURFACEM geometries</para>
+                               <itemizedlist>
+                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                               <xsl:for-each select='//refentry'>
+                                       <xsl:sort select="@id"/>
+                                       <xsl:variable name='comment'>
+                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                       </xsl:variable>
+                                       <xsl:variable name="refid">
+                                               <xsl:value-of select="@id" />
+                                       </xsl:variable>
+                                       <xsl:variable name="refname">
+                                               <xsl:value-of select="refnamediv/refname" />
+                                       </xsl:variable>
+
+                       <!-- For each section if there is note that it supports Polyhedral surfaces catalog it -->
+                                               <xsl:for-each select="refsection">
+                                                       <xsl:for-each select="para">
+                                                               <xsl:choose>
+                                                                       <xsl:when test="contains(.,'supports Polyhedral')">
+                                                                               <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></simpara></listitem>
+                                                                       </xsl:when>
+                                                               </xsl:choose>
+                                                       </xsl:for-each>
+                                               </xsl:for-each>
+                               </xsl:for-each>
+                               </itemizedlist>
+               </sect1>
+
+               <sect1 id="PostGIS_TypeFunctionMatrix">
+                       <xsl:variable name='matrix_checkmark'><![CDATA[<inlinemediaobject><imageobject><imagedata fileref='images/matrix_checkmark.png' /></imageobject></inlinemediaobject>]]></xsl:variable>
+                       <xsl:variable name='matrix_transform'><![CDATA[<inlinemediaobject><imageobject><imagedata fileref='images/matrix_transform.png' /></imageobject></inlinemediaobject>]]></xsl:variable>
+                       <xsl:variable name='matrix_autocast'><![CDATA[<inlinemediaobject><imageobject><imagedata fileref='images/matrix_autocast.png' /></imageobject></inlinemediaobject>]]></xsl:variable>
+                       <title>PostGIS Function Support Matrix</title>
+
+                       <para>Below is an alphabetical listing of spatial specific functions in PostGIS and the kinds of spatial
+                               types they work with or OGC/SQL compliance they try to conform to.</para>
+                       <para><itemizedlist>
+                               <listitem><simpara>A <xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/> means the function works with the type or subtype natively.</simpara></listitem>
+                               <listitem><simpara>A <xsl:value-of select="$matrix_transform" disable-output-escaping="yes"/> means it works but with a transform cast built-in using cast to geometry, transform to a "best srid" spatial ref and then cast back. Results may not be as expected for large areas or areas at poles 
+                                               and may accumulate floating point junk.</simpara></listitem>
+                               <listitem><simpara>A <xsl:value-of select="$matrix_autocast" disable-output-escaping="yes"/> means the function works with the type because of a auto-cast to another such as to box3d rather than direct type support.</simpara></listitem>
+                               <listitem><simpara>geom - Basic 2D geometry support (x,y).</simpara></listitem>
+                               <listitem><simpara>geog - Basic 2D geography support (x,y).</simpara></listitem>
+                               <listitem><simpara>2.5D - basic 2D geometries in 3 D/4D space (has Z or M coord).</simpara></listitem>
+                               <listitem><simpara>PS - Polyhedral surfaces</simpara></listitem>
+                               <listitem><simpara>T - Triangles and Triangulated Irregular Network surfaces (TIN)</simpara></listitem>
+                               </itemizedlist>
+                       </para>
+                               
+                       <para>
+                               <informaltable frame='all'>
+                                       <tgroup cols='8' align='left' colsep='1' rowsep='1'>
+                                               <colspec colname='function' align='left'/>
+                                               <colspec colname='geometry' align='center'/>
+                                               <colspec colname='geography' align='center'/>
+                                               <colspec colname='25D' align='center'/>
+                                               <colspec colname='Curves' align='center'/>
+                                               <colspec colname='SQLMM' align='center' />
+                                               <colspec colname='PS' align='center' />
+                                               <colspec colname='T' align='center' />
+                                               <thead>
+                                                 <row>
+                                                       <entry>Function</entry>
+                                                       <entry>geom</entry>
+                                                       <entry>geog</entry>
+                                                       <entry>2.5D</entry>
+                                                       <entry>Curves</entry>
+                                                       <entry>SQL MM</entry>
+                                                       <entry>PS</entry>
+                                                       <entry>T</entry>
+                                                 </row>
+                                               </thead>
+                                               <tbody>
+                                               <!-- Exclude PostGIS types, management functions, long transaction support, or exceptional functions from consideration  -->
+                                               <!-- leaving out operators in an effor to try to fit on one page -->
+                                               <xsl:for-each select="sect1[not(@id='PostGIS_Types' or @id='Management_Functions' or @id='Long_Transactions_Support' or @id='Exceptional_Functions')]/refentry">
+                                                       <xsl:sort select="@id"/>
+                                                       <xsl:variable name='comment'>
+                                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                                       </xsl:variable>
+                                                       <xsl:variable name="refid">
+                                                               <xsl:value-of select="@id" />
+                                                       </xsl:variable>
+                                                       <xsl:variable name="refname">
+                                                               <xsl:value-of select="refnamediv/refname" />
+                                                       </xsl:variable>
+                       
+                                                       <row>
+                                                               <!-- Display name of function and link to it -->
+                                                               <entry><link linkend="{$refid}"><xsl:value-of select="$refname" /></link></entry>
+                                                               <!-- If at least one proto function accepts or returns a geometry -->
+                                                               <xsl:choose>
+                                                                       <!-- direct support -->
+                                                                       <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'geometry') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geometry')">
+                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>
+                                                                       </xsl:when>
+                                                                       <!-- support via autocast -->
+                                                                       <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'box') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'box')">
+                                                                               <entry><xsl:value-of select="$matrix_autocast" disable-output-escaping="yes"/></entry>
+                                                                       </xsl:when>
+                                                                       <!-- no support -->
+                                                                       <xsl:otherwise>
+                                                                               <entry></entry>
+                                                                       </xsl:otherwise>
+                                                               </xsl:choose>
+                                                               <!-- If at least one proto function accepts or returns a geography -->
+                                                               <xsl:choose>
+                                                                       <!-- Support via geometry transform hack -->
+                                                                       <xsl:when test="(contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')) and contains($comment,'(T)')">
+                                                                               <entry><xsl:value-of select="$matrix_transform" disable-output-escaping="yes"/></entry>
+                                                                       </xsl:when>
+                                                                       <!-- direct support -->
+                                                                       <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')">
+                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>
+                                                                       </xsl:when>
+                                                                       <!-- no support -->
+                                                                       <xsl:otherwise>
+                                                                               <entry></entry>
+                                                                       </xsl:otherwise>
+                                                               </xsl:choose>
+                                                               
+                                                               <!-- If at least one paragraph contains support 3d -->
+                                                               <xsl:choose>
+                                                                       <!-- supports -->
+                                                                       <xsl:when test="contains(.,'This function supports 3d')">
+                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>
+                                                                       </xsl:when>
+                                                                       <!-- no support -->
+                                                                       <xsl:otherwise>
+                                                                               <entry></entry>
+                                                                       </xsl:otherwise>
+                                                               </xsl:choose>
+                                                               <!-- Support for Curve -->
+                                                               <xsl:choose>
+                                                                       <!-- supports -->
+                                                                       <xsl:when test="contains(.,'supports Circular Strings')">
+                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>
+                                                                       </xsl:when>
+                                                                       <!-- no support -->
+                                                                       <xsl:otherwise>
+                                                                               <entry></entry>
+                                                                       </xsl:otherwise>
+                                                               </xsl:choose>   
+                                                               <!-- SQL MM compliance -->
+                                                               <xsl:choose>
+                                                                       <!-- supports -->
+                                                                       <xsl:when test="contains(.,'implements the SQL/MM')">
+                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>
+                                                                       </xsl:when>
+                                                                       <!-- no support -->
+                                                                       <xsl:otherwise>
+                                                                               <entry></entry>
+                                                                       </xsl:otherwise>
+                                                               </xsl:choose>
+                                                       <!-- Polyhedral surface support -->
+                                                               <xsl:choose>
+                                                                       <!-- supports -->
+                                                                       <xsl:when test="contains(.,'Polyhedral')">
+                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>
+                                                                       </xsl:when>
+                                                                       <!-- no support -->
+                                                                       <xsl:otherwise>
+                                                                               <entry></entry>
+                                                                       </xsl:otherwise>
+                                                               </xsl:choose>
+                                                       <!-- Triangle and TIN surface support -->
+                                                               <xsl:choose>
+                                                                       <!-- supports -->
+                                                                       <xsl:when test="contains(.,'Triang')">
+                                                                               <entry><xsl:value-of select="$matrix_checkmark" disable-output-escaping="yes"/></entry>
+                                                                       </xsl:when>
+                                                                       <!-- no support -->
+                                                                       <xsl:otherwise>
+                                                                               <entry></entry>
+                                                                       </xsl:otherwise>
+                                                               </xsl:choose>
+                                                       </row>
+                                               </xsl:for-each>
+                                               </tbody>
+                                       </tgroup>
+               </informaltable>        
+               </para>
+          </sect1>
+
+               <sect1 id="NewFunctions">
+                       <title>New, Enhanced or changed PostGIS Functions</title>
+                       <sect2 id="NewFunctions_2_0">
+                               <title>PostGIS Functions new, behavior changed, or enhanced in 2.0</title>
+                               <para>The functions given below are PostGIS functions that were added, enhanced, or have breaking changes in 2.0 releases.</para>
+                               <para>New geometry types: TIN and Polyhedral surfaces was introduced in 2.0</para>
+                               <note><para>Greatly improved support for Topology.  Please refer to <xref linkend="Topology" /> for more details.</para></note>
+                               <note><para>In PostGIS 2.0, raster type and raster functionality has been integrated.  There are way too many new raster functions to list here and all are new so 
+                                       please refer to <xref linkend="RT_reference" /> for more details of the raster functions available.</para></note>
+                               <itemizedlist>
+                               <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                                       <xsl:for-each select='//refentry'>
+                                               <xsl:sort select="@id"/>
+                                               <xsl:variable name='comment'>
+                                                       <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                               </xsl:variable>
+                                               <xsl:variable name="refid">
+                                                       <xsl:value-of select="@id" />
+                                               </xsl:variable>
+                                               
+                                               <xsl:variable name="refname">
+                                                       <xsl:value-of select="refnamediv/refname" />
+                                               </xsl:variable>
+
+
+                               <!-- For each section if there is note about availability in this version -->
+                                                       <xsl:for-each select="refsection">
+                                                               <xsl:for-each select="para">
+                                                                       <xsl:choose>
+                                                                               <xsl:when test="contains(.,'Availability: 2.0')">
+                                                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="." /><xsl:text> </xsl:text> <xsl:value-of select="$comment" /></simpara></listitem>
+                                                                               </xsl:when>
+                                                                       </xsl:choose>
+                                                               </xsl:for-each>
+                                                       </xsl:for-each>
+                                       </xsl:for-each>
+                               </itemizedlist>
+                               
+                               <para>The functions given below are PostGIS functions that are enhanced in PostGIS 2.0.</para>
+                               <itemizedlist>
+                               <!-- Pull out the purpose section for each ref entry   -->
+                                       <xsl:for-each select='//refentry'>
+                                               <xsl:sort select="@id"/>
+                                               <xsl:variable name="refid">
+                                                       <xsl:value-of select="@id" />
+                                               </xsl:variable>
+                                               
+                                               <xsl:variable name="refname">
+                                                       <xsl:value-of select="refnamediv/refname" />
+                                               </xsl:variable>
+                               <!-- For each section if there is note about enhanced in this version -->
+                                                       <xsl:for-each select="refsection">
+                                                               <xsl:for-each select="para">
+                                                                       <xsl:choose>
+                                                                               <xsl:when test="contains(.,'Enhanced: 2.0')">
+                                                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="." /></simpara></listitem>
+                                                                               </xsl:when>
+                                                                       </xsl:choose>
+                                                               </xsl:for-each>
+                                                       </xsl:for-each>
+                                       </xsl:for-each>
+                               </itemizedlist>
+                               
+                               <para>The functions given below are PostGIS functions that have changed behavior in PostGIS 2.0.</para>
+                               <note><para>Most deprecated functions have been removed.  These are functions that haven't been documented since 1.2
+                                       or some internal functions that were never documented.  If you are using a function that you don't see documented,
+                                       it's probably deprecated, about to be deprecated, or internal and should be avoided.</para></note>
+                               <itemizedlist>
+                               <!-- Pull out the purpose section for each ref entry   -->
+                                       <xsl:for-each select='//refentry'>
+                                               <xsl:sort select="@id"/>
+                                               <xsl:variable name="refid">
+                                                       <xsl:value-of select="@id" />
+                                               </xsl:variable>
+                                               
+                                               <xsl:variable name="refname">
+                                                       <xsl:value-of select="refnamediv/refname" />
+                                               </xsl:variable>
+                               <!-- For each section if there is note about enhanced in this version -->
+                                                       <xsl:for-each select="refsection">
+                                                               <xsl:for-each select="para">
+                                                                       <xsl:choose>
+                                                                               <xsl:when test="contains(.,'Changed: 2.0')">
+                                                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="." /></simpara></listitem>
+                                                                               </xsl:when>
+                                                                       </xsl:choose>
+                                                               </xsl:for-each>
+                                                       </xsl:for-each>
+                                       </xsl:for-each>
+                               </itemizedlist>
+                       </sect2>
+                       <sect2 id="NewFunctions_1_5">
+                               <title>PostGIS Functions new, behavior changed, or enhanced in 1.5</title>
+                               <para>The functions given below are PostGIS functions that were introduced or enhanced in this minor release.</para>
+                               <itemizedlist>
+                               <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                                       <xsl:for-each select='//refentry'>
+                                               <xsl:sort select="@id"/>
+                                               <xsl:variable name='comment'>
+                                                       <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                               </xsl:variable>
+                                               <xsl:variable name="refid">
+                                                       <xsl:value-of select="@id" />
+                                               </xsl:variable>
+                                               
+                                               <xsl:variable name="refname">
+                                                       <xsl:value-of select="refnamediv/refname" />
+                                               </xsl:variable>
+
+
+                               <!-- For each section if there is note about availability in this version -->
+                                                       <xsl:for-each select="refsection">
+                                                               <xsl:for-each select="para">
+                                                                       <xsl:choose>
+                                                                               <xsl:when test="contains(.,'Availability: 1.5')">
+                                                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="." /><xsl:text> </xsl:text> <xsl:value-of select="$comment" /></simpara></listitem>
+                                                                               </xsl:when>
+                                                                       </xsl:choose>
+                                                               </xsl:for-each>
+                                                       </xsl:for-each>
+                                       </xsl:for-each>
+                               </itemizedlist>
+                       </sect2>
+                       <sect2 id="NewFunctions_1_4">
+                               <title>PostGIS Functions new, behavior changed, or enhanced in 1.4</title>
+                               <para>The functions given below are PostGIS functions that were introduced or enhanced in the 1.4 release.</para>
+                               <itemizedlist>
+                               <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                                       <xsl:for-each select='//refentry'>
+                                               <xsl:sort select="@id"/>
+                                               <xsl:variable name='comment'>
+                                                       <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                               </xsl:variable>
+                                               <xsl:variable name="refid">
+                                                       <xsl:value-of select="@id" />
+                                               </xsl:variable>
+
+                               <!-- For each section if there is note about availability in this version -->
+                                                       <xsl:for-each select="refsection">
+                                                               <xsl:for-each select="para|note">
+                                                                       <xsl:choose>
+                                                                               <xsl:when test="contains(.,'Availability: 1.4')">
+                                                                                       <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /> <xsl:text> </xsl:text><xsl:value-of select="." /></simpara></listitem>
+                                                                               </xsl:when>
+                                                                       </xsl:choose>
+                                                               </xsl:for-each>
+                                                       </xsl:for-each>
+                                       </xsl:for-each>
+                               </itemizedlist>
+                       </sect2>
+                       <sect2 id="NewFunctions_1_3">
+                               <title>PostGIS Functions new in 1.3</title>
+                               <para>The functions given below are PostGIS functions that were introduced in the 1.3 release.</para>
+                               <itemizedlist>
+                               <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+                               <xsl:for-each select='//refentry'>
+                                       <xsl:sort select="@id"/>
+                                       <xsl:variable name='comment'>
+                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+                                       </xsl:variable>
+                                       <xsl:variable name="refid">
+                                               <xsl:value-of select="@id" />
+                                       </xsl:variable>
+
+                               <!-- For each section if there is note about availability in this version -->
+                                               <xsl:for-each select="refsection">
+                                                       <xsl:for-each select="para">
+                                                               <xsl:choose>
+                                                                       <xsl:when test="contains(.,'Availability: 1.3')">
+                                                                               <listitem><simpara><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /> <xsl:text> </xsl:text><xsl:value-of select="." /></simpara></listitem>
+                                                                       </xsl:when>
+                                                               </xsl:choose>
+                                                       </xsl:for-each>
+                                               </xsl:for-each>
+                               </xsl:for-each>
+                               </itemizedlist>
+                       </sect2>
+               </sect1>
+
+       </chapter>
+       </xsl:template>
+
+       <!--macro to pull out function parameter names so we can provide a pretty arg list prefix for each function -->
+       <xsl:template name="listparams">
+               <xsl:param name="func" />
+               <xsl:for-each select="$func">
+                       <xsl:if test="count(paramdef/parameter) &gt; 0">args: </xsl:if>
+                       <xsl:for-each select="paramdef">
+                               <xsl:choose>
+                                       <xsl:when test="count(parameter) &gt; 0">
+                                               <xsl:value-of select="parameter" />
+                                       </xsl:when>
+                               </xsl:choose>
+                               <xsl:if test="position()&lt;last()"><xsl:text>, </xsl:text></xsl:if>
+                       </xsl:for-each>
+                       <xsl:if test="count(paramdef/parameter) &gt; 0"> - </xsl:if>
+               </xsl:for-each>
+       </xsl:template>
+
+</xsl:stylesheet>