]> granicus.if.org Git - postgis/commitdiff
Started migration of the functions in reference.xml using the <variablelist> concept...
authorKevin Neufeld <kneufeld.ca@gmail.com>
Tue, 15 Jul 2008 06:57:32 +0000 (06:57 +0000)
committerKevin Neufeld <kneufeld.ca@gmail.com>
Tue, 15 Jul 2008 06:57:32 +0000 (06:57 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2850 b70326c6-7e19-0410-871a-916f4a2858ee

12 files changed:
doc/Makefile.in
doc/html/images/caution.png [new file with mode: 0644]
doc/html/images/check.png [new file with mode: 0644]
doc/html/images/important.png [new file with mode: 0644]
doc/html/images/note.png [new file with mode: 0644]
doc/html/images/tip.png [new file with mode: 0644]
doc/html/images/warning.png [new file with mode: 0644]
doc/postgis.xml
doc/reference.xml
doc/reference_new.xml [new file with mode: 0644]
doc/release_notes.xml
doc/template.xml [new file with mode: 0644]

index 4ab81bc2b0d7bc4cfcd6bb7ec4c053bf31b85760..fd8fe81fd80491ecf1ec382ba76789ca45832f5d 100644 (file)
@@ -15,7 +15,13 @@ XSLBASE = @XSLBASE@
 XSLTPROC_COMMONOPTS = \
        --param section.autolabel 1 \
        --param section.label.includes.component.label 1 \
-       --param chunk.section.depth 0 
+       --param chunk.section.depth 0 \
+       --param generate.section.toc.level 1 \
+       --param funcsynopsis.style ansi \
+       --param admon.graphics 1 \
+       --param admon.textlabel 0 \
+       --param simplesect.in.toc 0 \
+       --param use.id.as.filename 1
 
 XSLTPROC_HTMLOPTS = \
        --stringparam html.stylesheet style.css \
@@ -38,7 +44,7 @@ else
 all: html/postgis.html
 endif
 
-postgis-out.xml: postgis.xml introduction.xml installation.xml faq.xml using_postgis.xml performance_tips.xml reference.xml reporting.xml release_notes.xml ../Version.config
+postgis-out.xml: postgis.xml introduction.xml installation.xml faq.xml using_postgis.xml performance_tips.xml reference.xml reference_new.xml reporting.xml release_notes.xml ../Version.config
        cat $< | sed "s/@@LAST_RELEASE_VERSION@@/@POSTGIS_LIB_VERSION@/g" > $@
 
 chunked-html: postgis-out.xml
diff --git a/doc/html/images/caution.png b/doc/html/images/caution.png
new file mode 100644 (file)
index 0000000..5b7809c
Binary files /dev/null and b/doc/html/images/caution.png differ
diff --git a/doc/html/images/check.png b/doc/html/images/check.png
new file mode 100644 (file)
index 0000000..d6b28fc
Binary files /dev/null and b/doc/html/images/check.png differ
diff --git a/doc/html/images/important.png b/doc/html/images/important.png
new file mode 100644 (file)
index 0000000..12c90f6
Binary files /dev/null and b/doc/html/images/important.png differ
diff --git a/doc/html/images/note.png b/doc/html/images/note.png
new file mode 100644 (file)
index 0000000..b1bcaed
Binary files /dev/null and b/doc/html/images/note.png differ
diff --git a/doc/html/images/tip.png b/doc/html/images/tip.png
new file mode 100644 (file)
index 0000000..5c4aab3
Binary files /dev/null and b/doc/html/images/tip.png differ
diff --git a/doc/html/images/warning.png b/doc/html/images/warning.png
new file mode 100644 (file)
index 0000000..1c33db8
Binary files /dev/null and b/doc/html/images/warning.png differ
index 600765407e9201fd94059bf7f446220be2a5abfc..2f1f505950b2c7f5eb6e3ac48ecfc293fe1cab40 100644 (file)
@@ -8,6 +8,7 @@
 <!ENTITY using_postgis SYSTEM "using_postgis.xml">
 <!ENTITY performance_tips SYSTEM "performance_tips.xml">
 <!ENTITY reference SYSTEM "reference.xml">
+<!ENTITY reference_new SYSTEM "reference_new.xml">
 <!ENTITY reporting SYSTEM "reporting.xml">
 <!ENTITY release_notes SYSTEM "release_notes.xml">
 
@@ -48,6 +49,7 @@
   &using_postgis;
   &performance_tips;
   &reference;
+  &reference_new;
   &reporting;
   &release_notes;
     
index 6dc57362e6ad9c07569230b9886b1df27f079a4d..e30029b8d34a1b20ac8671ea491bab2d8459cef5 100644 (file)
   <sect1>
     <title>OpenGIS Functions</title>
 
-    <sect2>
-      <title>Management Functions</title>
-
-      <variablelist>
-        <varlistentry id="AddGeometryColumn">
-          <term>AddGeometryColumn(varchar, varchar, varchar, integer, varchar,
-          integer)</term>
-
-          <listitem>
-            <para>Syntax: AddGeometryColumn(&lt;schema_name&gt;,
-            &lt;table_name&gt;, &lt;column_name&gt;, &lt;srid&gt;,
-            &lt;type&gt;, &lt;dimension&gt;). Adds a geometry column to an
-            existing table of attributes. The <varname>schema_name</varname>
-            is the name of the table schema (unused for pre-schema PostgreSQL
-            installations). The <varname>srid</varname> must be an integer
-            value reference to an entry in the SPATIAL_REF_SYS table. The
-            <varname>type</varname> must be an uppercase string corresponding
-            to the geometry type, eg, 'POLYGON' or 'MULTILINESTRING'.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term>DropGeometryColumn(varchar, varchar, varchar)</term>
-
-          <listitem>
-            <para>Syntax: DropGeometryColumn(&lt;schema_name&gt;,
-            &lt;table_name&gt;, &lt;column_name&gt;). Remove a geometry column
-            from a spatial table. Note that schema_name will need to match the
-            f_schema_name field of the table's row in the geometry_columns
-            table.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term>ST_SetSRID(geometry, integer)</term>
-
-          <listitem>
-            <para>Set the SRID on a geometry to a particular integer value.
-            Useful in constructing bounding boxes for queries.</para>
-          </listitem>
-        </varlistentry>
-      </variablelist>
-    </sect2>
-
     <sect2>
       <title>Geometry Relationship Functions</title>
 
       <variablelist>
-        <varlistentry>
-          <term>ST_Distance(A geometry, B geometry)</term>
-
-          <listitem>
-            <para>Return the cartesian distance between two geometries in
-            projected units. Does not use indexes.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term>ST_DWithin(A geometry, B geometry, sriddistance float)</term>
-
-          <listitem>
-            <para>Returns true if geometries are within the specified sriddistance
-            of one another. sriddistance is in units defined by the spatial reference system and both
-                       geometries must have the same SRID.
-                       Uses indexes if available.</para>
-                       
-                       <programlisting>
---Find the nearest hospital to each school 
---that is within 3000 units of the school.  
--- We do an ST_DWithin search to utilize indexes to limit our search list
--- that the non-indexable ST_Distance needs to process
---If the units of the spatial reference is meters then units would be meters
-SELECT DISTINCT ON (s.gid) s.gid, s.school_name, s.the_geom, h.hospital_name
-       FROM schools s 
-               LEFT JOIN hospitals h ON ST_DWithin(s.the_geom, h.the_geom, 3000)
-       ORDER BY s.gid, ST_Distance(s.the_geom, h.the_geom);
-                       </programlisting>
-          </listitem>
-        </varlistentry>
-
         <varlistentry>
           <term>ST_Equals(geometry, geometry)</term>
 
@@ -1255,17 +1179,6 @@ GROUP BY gid, field1,field2;
       <title>Management Functions</title>
 
       <variablelist>
-        <varlistentry>
-          <term>DropGeometryTable([&lt;schema_name&gt;],
-          &lt;table_name&gt;)</term>
-
-          <listitem>
-            <para>Drops a table and all its references in geometry_columns.
-            Note: uses current_schema() on schema-aware pgsql installations if
-            schema is not provided.</para>
-          </listitem>
-        </varlistentry>
-
         <varlistentry>
           <term>UpdateGeometrySRID([&lt;schema_name&gt;], &lt;table_name&gt;,
           &lt;column_name&gt;, &lt;srid&gt;)</term>
@@ -1560,20 +1473,20 @@ GROUP BY gid, field1,field2;
           </listitem>
         </varlistentry>
 
-        <varlistentry>
-          <term>ST_distance_sphere(point, point)</term>
+        <varlistentry id="ST_Distance_Sphere">
+          <term>ST_Distance_Sphere(point, point)</term>
 
           <listitem>
             <para>Returns linear distance in meters between two lat/lon
             points. Uses a spherical earth and radius of 6370986 meters.
             Faster than <link
-            linkend="distance_spheroid">distance_spheroid()</link>, but less
+            linkend="ST_Distance_Spheroid">ST_Distance_Spheroid()</link>, but less
             accurate. Only implemented for points.</para>
           </listitem>
         </varlistentry>
 
-        <varlistentry id="distance_spheroid">
-          <term>ST_distance_spheroid(point, point, spheroid)</term>
+        <varlistentry id="ST_Distance_Spheroid">
+          <term>ST_Distance_Spheroid(point, point, spheroid)</term>
 
           <listitem>
             <para>Returns linear distance between two lat/lon points given a
@@ -1638,14 +1551,6 @@ GROUP BY gid, field1,field2;
           </listitem>
         </varlistentry>
 
-        <varlistentry>
-          <term>ST_distance(geometry, geometry)</term>
-
-          <listitem>
-            <para>Returns the smaller distance between two geometries.</para>
-          </listitem>
-        </varlistentry>
-
         <varlistentry>
           <term>ST_max_distance(linestring,linestring)</term>
 
@@ -2235,7 +2140,7 @@ UPDATE sometable
           </listitem>
         </varlistentry>
 
-        <varlistentry>
+        <varlistentry id="ST_Transform">
           <term>ST_Transform(geometry,integer)</term>
 
           <listitem>
@@ -3022,16 +2927,6 @@ WHERE n*100.00/length &lt; 1;
         </listitem>
       </varlistentry>
 
-      <varlistentry>
-        <term>ST_Distance</term>
-
-        <listitem>
-          <para>Return the distance between two geometries.</para>
-
-          <para>SQL-MM 3: 5.1.23</para>
-        </listitem>
-      </varlistentry>
-
       <varlistentry>
         <term>ST_EndPoint</term>
 
diff --git a/doc/reference_new.xml b/doc/reference_new.xml
new file mode 100644 (file)
index 0000000..56892db
--- /dev/null
@@ -0,0 +1,571 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter>
+  <title>PostGIS Reference</title>
+
+  <para>The functions given below are the ones which a user of PostGIS is
+  likely to need. There are other functions which are required support
+  functions to the PostGIS objects which are not of use to a general
+  user.</para>
+
+  <note>
+    <para>PostGIS has begun a transition from the existing naming convention
+    to an SQL-MM-centric convention. As a result, most of the functions that
+    you know and love have been renamed using the standard spatial type (ST)
+    prefix. Previous functions are still available, though are not listed in
+    this document where updated functions are equivalent. These will be
+    deprecated in a future release.</para>
+  </note>
+
+  <sect1>
+    <title>Management Functions</title>
+
+    <refentry id="AddGeometryColumn">
+      <refnamediv>
+        <refname>AddGeometryColumn</refname>
+
+        <refpurpose>Adds a geometry column to an existing table of
+        attributes.</refpurpose>
+      </refnamediv>
+
+      <refsynopsisdiv>
+        <funcsynopsis>
+          <funcprototype>
+            <funcdef>text <function>AddGeometryColumn</function></funcdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>table_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>column_name</parameter></paramdef>
+
+            <paramdef><type>integer </type>
+            <parameter>srid</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>type</parameter></paramdef>
+
+            <paramdef><type>integer </type>
+            <parameter>dimension</parameter></paramdef>
+          </funcprototype>
+
+          <funcprototype>
+            <funcdef>text <function>AddGeometryColumn</function></funcdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>schema_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>table_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>column_name</parameter></paramdef>
+
+            <paramdef><type>integer </type>
+            <parameter>srid</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>type</parameter></paramdef>
+
+            <paramdef><type>integer </type>
+            <parameter>dimension</parameter></paramdef>
+          </funcprototype>
+
+          <funcprototype>
+            <funcdef>text <function>AddGeometryColumn</function></funcdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>catalog_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>schema_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>table_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>column_name</parameter></paramdef>
+
+            <paramdef><type>integer </type>
+            <parameter>srid</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>type</parameter></paramdef>
+
+            <paramdef><type>integer </type>
+            <parameter>dimension</parameter></paramdef>
+          </funcprototype>
+        </funcsynopsis>
+      </refsynopsisdiv>
+
+      <refsection>
+        <title>Description</title>
+
+        <para>Adds a geometry column to an existing table of attributes. The
+        <varname>schema_name</varname> is the name of the table schema (unused
+        for pre-schema PostgreSQL installations). The <varname>srid</varname>
+        must be an integer value reference to an entry in the SPATIAL_REF_SYS
+        table. The <varname>type</varname> must be an uppercase string
+        corresponding to the geometry type, eg, 'POLYGON' or
+        'MULTILINESTRING'.</para>
+
+        <para>
+          <inlinegraphic class="sfs_compliant" fileref="images/check.png" />
+          This method implements the
+          <ulink url="http://www.opengeospatial.org/standards/sfs">OpenGIS Simple
+          Features Implementation Specification for SQL.</ulink>
+        </para>
+      </refsection>
+
+      <refsection>
+        <title>Examples</title>
+
+        <programlisting>
+-- Create a new simple PostgreSQL table
+postgis=# CREATE TABLE my_schema.my_spatial_table (id serial);
+
+-- Describing the table shows a simple table with a single "id" column.
+postgis=# \d my_schema.my_spatial_table
+                             Table "my_schema.my_spatial_table"
+ Column |  Type   |                                Modifiers                                
+--------+---------+-------------------------------------------------------------------------
+ id     | integer | not null default nextval('my_schema.my_spatial_table_id_seq'::regclass)
+
+-- Add a spatial column to the table
+postgis=# SELECT AddGeometryColumn ('my_schema','my_spatial_table','the_geom',4326,'POINT',2);
+
+-- Describe the table again reveals the addition of a new "the_geom" column.
+postgis=# \d my_schema.my_spatial_table
+                              Table "my_schema.my_spatial_table"
+  Column  |   Type   |                                Modifiers                                
+----------+----------+-------------------------------------------------------------------------
+ id       | integer  | not null default nextval('my_schema.my_spatial_table_id_seq'::regclass)
+ the_geom | geometry | 
+Check constraints:
+    "enforce_dims_the_geom" CHECK (ndims(the_geom) = 2)
+    "enforce_geotype_the_geom" CHECK (geometrytype(the_geom) = 'POINT'::text OR the_geom IS NULL)
+    "enforce_srid_the_geom" CHECK (srid(the_geom) = 4326)
+        </programlisting>
+      </refsection>
+      
+      <refsection>
+        <title>See Also</title>
+
+        <para><xref linkend="DropGeometryColumn"/>, <xref linkend="DropGeometryTable"/></para>
+      </refsection>
+    </refentry>
+
+    <refentry id="DropGeometryColumn">
+      <refnamediv>
+        <refname>DropGeometryColumn</refname>
+
+        <refpurpose>Removes a geometry column from a spatial
+        table.</refpurpose>
+      </refnamediv>
+
+      <refsynopsisdiv>
+        <funcsynopsis>
+          <funcprototype>
+            <funcdef>text <function>DropGeometryColumn</function></funcdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>table_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>column_name</parameter></paramdef>
+          </funcprototype>
+
+          <funcprototype>
+            <funcdef>text <function>DropGeometryColumn</function></funcdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>schema_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>table_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>column_name</parameter></paramdef>
+          </funcprototype>
+
+          <funcprototype>
+            <funcdef>text <function>DropGeometryColumn</function></funcdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>catalog_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>schema_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>table_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>column_name</parameter></paramdef>
+          </funcprototype>
+        </funcsynopsis>
+      </refsynopsisdiv>
+
+      <refsection>
+        <title>Description</title>
+
+        <para>Removes a geometry column from a spatial table. Note that
+        schema_name will need to match the f_schema_name field of the table's
+        row in the geometry_columns table.</para>
+
+        <para>
+          <inlinegraphic class="sfs_compliant" fileref="images/check.png" />
+          This method implements the
+          <ulink url="http://www.opengeospatial.org/standards/sfs">OpenGIS Simple
+          Features Implementation Specification for SQL.</ulink>
+        </para>
+      </refsection>
+      
+      <refsection>
+        <title>See Also</title>
+
+        <para><xref linkend="AddGeometryColumn"/>, <xref linkend="DropGeometryTable"/></para>
+      </refsection>
+    </refentry>
+
+    <refentry id="DropGeometryTable">
+      <refnamediv>
+        <refname>DropGeometryTable</refname>
+
+        <refpurpose>Drops a table and all its references in
+        geometry_columns.</refpurpose>
+      </refnamediv>
+
+      <refsynopsisdiv>
+        <funcsynopsis>
+          <funcprototype>
+            <funcdef>boolean <function>DropGeometryTable</function></funcdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>table_name</parameter></paramdef>
+          </funcprototype>
+
+          <funcprototype>
+            <funcdef>boolean <function>DropGeometryTable</function></funcdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>schema_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>table_name</parameter></paramdef>
+          </funcprototype>
+        </funcsynopsis>
+      </refsynopsisdiv>
+
+      <refsection>
+        <title>Description</title>
+
+        <para>Drops a table and all its references in geometry_columns. Note:
+        uses current_schema() on schema-aware pgsql installations if schema is
+        not provided.</para>
+      </refsection>
+      
+      <refsection>
+        <title>See Also</title>
+
+        <para><xref linkend="AddGeometryColumn"/>, <xref linkend="DropGeometryColumn"/></para>
+      </refsection>
+    </refentry>
+
+    <refentry id="UpdateGeometrySRID">
+      <refnamediv>
+        <refname>UpdateGeometrySRID</refname>
+
+        <refpurpose>Updates the SRID of all features in a geometry
+        column</refpurpose>
+      </refnamediv>
+
+      <refsynopsisdiv>
+        <funcsynopsis>
+          <funcprototype>
+            <funcdef>text <function>UpdateGeometrySRID</function></funcdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>table_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>column_name</parameter></paramdef>
+
+            <paramdef><type>integer </type>
+            <parameter>srid</parameter></paramdef>
+          </funcprototype>
+
+          <funcprototype>
+            <funcdef>text <function>UpdateGeometrySRID</function></funcdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>schema_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>table_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>column_name</parameter></paramdef>
+
+            <paramdef><type>integer </type>
+            <parameter>srid</parameter></paramdef>
+          </funcprototype>
+
+          <funcprototype>
+            <funcdef>text <function>UpdateGeometrySRID</function></funcdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>catalog_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>schema_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>table_name</parameter></paramdef>
+
+            <paramdef><type>varchar </type>
+            <parameter>column_name</parameter></paramdef>
+
+            <paramdef><type>integer </type>
+            <parameter>srid</parameter></paramdef>
+          </funcprototype>
+        </funcsynopsis>
+      </refsynopsisdiv>
+
+      <refsection>
+        <title>Description</title>
+
+        <para>Updates the SRID of all features in a geometry column, updating
+        constraints and reference in geometry_columns. Note: uses
+        current_schema() on schema-aware pgsql installations if schema is not
+        provided.</para>
+      </refsection>
+      
+      <refsection>
+        <title>See Also</title>
+
+        <para><xref linkend="ST_SetSRID"/></para>
+      </refsection>
+    </refentry>
+  </sect1>
+  
+  <sect1>
+      <title>Geometry Constructors</title>
+  </sect1>
+   
+  <sect1>
+      <title>Geometry Accessors</title>
+  </sect1>
+  
+  <sect1>
+      <title>Geometry Editors</title>
+      
+    <refentry id="ST_SetSRID">
+      <refnamediv>
+        <refname>ST_SetSRID</refname>
+
+        <refpurpose>Sets the SRID on a geometry to a particular integer
+        value.</refpurpose>
+      </refnamediv>
+
+      <refsynopsisdiv>
+        <funcsynopsis>
+          <funcprototype>
+            <funcdef>boolean <function>ST_SetSRID</function></funcdef>
+
+            <paramdef><type>Geometry </type>
+            <parameter>geom</parameter></paramdef>
+
+            <paramdef><type>integer </type>
+            <parameter>srid</parameter></paramdef>
+          </funcprototype>
+        </funcsynopsis>
+      </refsynopsisdiv>
+
+      <refsection>
+        <title>Description</title>
+
+        <para>Sets the SRID on a geometry to a particular integer value.
+        Useful in constructing bounding boxes for queries.</para>
+        
+        <note>
+          <para>This function does not transform the geometry is any way - 
+          it simply sets the projection the geometry that it's currently in.  
+          Use <xref linkend="ST_Transform"/> if you want to transform the 
+          geometry into a new projection.</para>
+        </note>
+
+        <para>
+          <inlinegraphic class="sfs_compliant" fileref="images/check.png" />
+          This method implements the
+          <ulink url="http://www.opengeospatial.org/standards/sfs">OpenGIS Simple
+          Features Implementation Specification for SQL.</ulink>
+        </para>
+      </refsection>    
+            
+      <refsection>
+        <title>See Also</title>
+
+        <para><xref linkend="ST_Transform"/></para>
+      </refsection>
+      
+    </refentry>
+  </sect1>
+
+  <sect1>
+      <title>Geometry Outputs</title>
+  </sect1>
+  
+  <sect1>
+      <title>Operators</title>
+  </sect1>
+  
+  
+  <sect1>
+    <title>Spatial Relationships</title>
+
+    <refentry id="ST_Distance">
+      <refnamediv>
+        <refname>ST_Distance</refname>
+
+        <refpurpose>Returns the cartesian distance between two geometries in
+        projected units.</refpurpose>
+      </refnamediv>
+
+      <refsynopsisdiv>
+        <funcsynopsis>
+          <funcprototype>
+            <funcdef>boolean <function>ST_Distance</function></funcdef>
+
+            <paramdef><type>Geometry </type>
+            <parameter>g1</parameter></paramdef>
+
+            <paramdef><type>Geometry </type>
+            <parameter>g2</parameter></paramdef>
+          </funcprototype>
+        </funcsynopsis>
+      </refsynopsisdiv>
+
+      <refsection>
+        <title>Description</title>
+
+        <para>Returns the cartesian distance between two geometries in
+        projected units.</para>
+
+        <para>
+          <inlinegraphic class="sfs_compliant" fileref="images/check.png" />
+          This method implements the
+          <ulink url="http://www.opengeospatial.org/standards/sfs">OpenGIS Simple
+          Features Implementation Specification for SQL.</ulink>
+        </para>
+
+        <para>
+          <inlinegraphic class="sql_mm_compliant" fileref="images/check.png" />
+          This method implements the SQL/MM specification: SQL-MM 3: 5.1.23
+        </para> 
+      </refsection>
+
+      <refsection>
+        <title>Examples</title>
+
+        <programlisting>postgis=# SELECT ST_Distance('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry);
+   st_distance   
+-----------------
+ 1.4142135623731
+(1 row)</programlisting>
+      </refsection>
+
+      <refsection>
+        <title>See Also</title>
+
+        <para><xref linkend="ST_DWithin"/>, <xref linkend="ST_Distance_Sphere"/>, <xref linkend="ST_Distance_Spheroid"/></para>
+      </refsection>
+    </refentry>
+
+    <refentry id="ST_DWithin">
+      <refnamediv>
+        <refname>ST_DWithin</refname>
+
+        <refpurpose>Returns true if the geometries are within the specified
+        distance of one another</refpurpose>
+      </refnamediv>
+
+      <refsynopsisdiv>
+        <funcsynopsis>
+          <funcprototype>
+            <funcdef>boolean <function>ST_DWithin</function></funcdef>
+
+            <paramdef><type>geometry </type>
+            <parameter>g1</parameter></paramdef>
+
+            <paramdef><type>geometry </type>
+            <parameter>g2</parameter></paramdef>
+
+            <paramdef><type>double precision </type>
+            <parameter>distance</parameter></paramdef>
+          </funcprototype>
+        </funcsynopsis>
+      </refsynopsisdiv>
+
+      <refsection>
+        <title>Description</title>
+
+        <para>Returns true if the geometries are within the specified distance
+        of one another. The distance is specified in units defined by the
+        spatial reference system of the geometries.  For this function to make
+        sense, the source geometries must both be of the same coorindate projection, 
+        having the same SRID.</para>
+
+        <note>
+          <para>This function call will automatically include a bounding box
+          comparison that will make use of any indexes that are available on
+          the geometries.</para>
+        </note>
+
+        <para>
+          <inlinegraphic class="sfs_compliant" fileref="images/check.png" />
+          This method implements the
+          <ulink url="http://www.opengeospatial.org/standards/sfs">OpenGIS Simple
+          Features Implementation Specification for SQL.</ulink>
+        </para>
+      </refsection>
+
+      <refsection>
+        <title>Examples</title>
+          <programlisting>
+--Find the nearest hospital to each school 
+--that is within 3000 units of the school.  
+-- We do an ST_DWithin search to utilize indexes to limit our search list
+-- that the non-indexable ST_Distance needs to process
+--If the units of the spatial reference is meters then units would be meters
+SELECT DISTINCT ON (s.gid) s.gid, s.school_name, s.the_geom, h.hospital_name
+       FROM schools s 
+               LEFT JOIN hospitals h ON ST_DWithin(s.the_geom, h.the_geom, 3000)
+       ORDER BY s.gid, ST_Distance(s.the_geom, h.the_geom);
+                         </programlisting>
+      </refsection>
+      
+      <refsection>
+        <title>See Also</title>
+
+        <para><xref linkend="ST_Distance"/></para>
+      </refsection>
+    </refentry>
+  </sect1>
+  
+  <sect1>
+      <title>Spatial Predicates</title>
+  </sect1>
+  
+  <sect1>
+      <title>Linear Referencing</title>
+  </sect1>
+  
+  <sect1>
+      <title>Long Transactions Support</title>
+  </sect1>
+  
+  <sect1>
+      <title>Misc</title>
+  </sect1>
+      
+</chapter>
\ No newline at end of file
index 94bd67e739bc730b0b02f517ca3c96f4eae43743..f017c2ed3c2d3d1ea08f53a78143af86f5ad9e90 100644 (file)
@@ -1,11 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <appendix id="release_notes">
   <title>Appendix</title>
-
-  <sect1>
-    <title>Release Notes</title>
-
-    <sect2>
+    <subtitle>Release Notes</subtitle>
+    
+    <sect1>
       <title>Release 1.3.3</title>
 
       <para>Release date: 2008/04/12</para>
@@ -14,9 +12,9 @@
       KML support, adds a ST_SimplifyPreserveTopology function, makes the
       build more sensitive to GEOS versions, and fixes a handful of severe but
       rare failure cases.</para>
-    </sect2>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.3.2</title>
 
       <para>Release date: 2007/12/01</para>
       <para>This release fixes bugs in ST_EndPoint() and ST_Envelope, improves
       support for JDBC building and OS/X, and adds better support for GML
       output with ST_AsGML(), including GML3 output.</para>
-    </sect2>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.3.1</title>
 
       <para>Release date: 2007/08/13</para>
 
       <para>This release fixes some oversights in the previous release around
       version numbering, documentation, and tagging.</para>
-    </sect2>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.3.0</title>
 
       <para>Release date: 2007/08/09</para>
@@ -45,7 +43,7 @@
       function names to the SQL-MM convension, using the spatial type (SP)
       prefix.</para>
 
-      <sect3>
+      <simplesect>
         <title>Added Functionality</title>
 
         <para>JDBC: Added Hibernate Dialect (thanks to Norman Barker)</para>
@@ -55,9 +53,9 @@
         http://lin-ear-th-inking.blogspot.com/2007/06/subtleties-of-ogc-covers-spatial.html</para>
 
         <para>Added ST_DWithin relational function.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Performance Enhancements</title>
 
         <para>Added cached and indexed point-in-polygon short-circuits for the
@@ -65,9 +63,9 @@
 
         <para>Added inline index support for relational functions (except
         ST_Disjoint)</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other Changes</title>
 
         <para>Extended curved geometry support into the geometry accessor and
         using a spatial type (ST) prefix.</para>
 
         <para>Added initial support for PostgreSQL 8.3</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.2.1</title>
 
       <para>Release date: 2007/01/11</para>
@@ -88,7 +86,7 @@
       <para>This release provides bug fixes in PostgreSQL 8.2 support and some
       small performance enhancements.</para>
 
-      <sect3>
+      <simplesect>
         <title>Changes</title>
 
         <para>Fixed point-in-polygon shortcut bug in Within().</para>
         JavaDoc is compiled and packaged. Fixed classpath problems with GCJ.
         Fixed pgjdbc 8.2 compatibility, losing support for jdk 1.3 and
         older.</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.2.0</title>
 
       <para>Release date: 2006/12/08</para>
       serialization/deserialization capabilities for SQL-MM defined curved
       geometries, as well as performance enhancements.</para>
 
-      <sect3>
+      <simplesect>
         <title>Changes</title>
 
         <para>Added curved geometry type support for
 
         <para>Added point-in-polygon shortcircuit to the Contains and Within
         functions to improve performance for these cases.</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.1.6</title>
 
       <para>Release date: 2006/11/02</para>
       parameters and an improvement in reprojections (take Z in
       consideration). Upgrade is <emphasis>encouraged</emphasis>.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.3 or later follow the
 
         <para>Upgrade from any release prior to 1.0.0RC6 requires an <link
         linkend="hard_upgrade">hard upgrade</link>.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Bug fixes</title>
 
         <para>fixed CAPI change that broke 64-bit platforms</para>
         <para>loader/dumper: fixed regression tests and usage output</para>
 
         <para>Fixed setSRID() bug in JDBC, thanks to Thomas Marti</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other changes</title>
 
         <para>use Z ordinate in reprojections</para>
 
         <para>Replace hand-made, fragile JDBC version parser with
         Properties</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.1.5</title>
 
       <para>Release date: 2006/10/13</para>
       <para>This is an bugfix release, including a critical segfault on win32.
       Upgrade is <emphasis>encouraged</emphasis>.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.3 or later follow the
 
         <para>Upgrade from any release prior to 1.0.0RC6 requires an <link
         linkend="hard_upgrade">hard upgrade</link>.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Bug fixes</title>
 
         <para>Fixed MingW link error that was causing pgsql2shp to segfault on
 
         <para>Fixed version tag in jdbc code that still said "1.1.3" in the
         "1.1.4" release.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>New Features</title>
 
         <para>Added -S option for non-multi geometries to shp2pgsql</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.1.4</title>
 
       <para>Release date: 2006/09/27</para>
       <para>This is an bugfix release including some improvements in the Java
       interface. Upgrade is <emphasis>encouraged</emphasis>.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.3 or later follow the
 
         <para>Upgrade from any release prior to 1.0.0RC6 requires an <link
         linkend="hard_upgrade">hard upgrade</link>.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Bug fixes</title>
 
         <para>Fixed support for PostgreSQL 8.2</para>
         <para>Fixed regress tests to pass with GEOS-3.0.0</para>
 
         <para>Improved pgsql2shp run concurrency.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Java changes</title>
 
         <para>reworked JTS support to reflect new upstream JTS developers'
         &lt;nbarker@ittvis.com&gt;</para>
 
         <para>Reorganized java directory layout a little.</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.1.3</title>
 
       <para>Release date: 2006/06/30</para>
       (most notably long transaction support) and portability enhancements.
       Upgrade is <emphasis>encouraged</emphasis>.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.3 or later follow the
 
         <para>Upgrade from any release prior to 1.0.0RC6 requires an <link
         linkend="hard_upgrade">hard upgrade</link>.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Bug fixes / correctness</title>
 
         <para>BUGFIX in distance(poly,poly) giving wrong results.</para>
 
         <para>WKT parser: forbidden construction of multigeometries with EMPTY
         elements (still supported for GEOMETRYCOLLECTION).</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>New functionalities</title>
 
         <para>NEW Long Transactions support.</para>
         <para>NEW DumpRings() function.</para>
 
         <para>NEW AsHEXEWKB(geom, XDR|NDR) function.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>JDBC changes</title>
 
         <para>Improved regression tests: MultiPoint and scientific
 
         <para>Added proper accessor functions for all fields in preparation of
         making those fields private later</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other changes</title>
 
         <para>NEW regress test support for loader/dumper.</para>
         <para>Don't link pgsql2shp to more libs then required.</para>
 
         <para>Initial support for PostgreSQL 8.2.</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.1.2</title>
 
       <para>Release date: 2006/03/30</para>
       portability enhancements. Upgrade is
       <emphasis>encouraged</emphasis>.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.3 or later follow the
 
         <para>Upgrade from any release prior to 1.0.0RC6 requires an <link
         linkend="hard_upgrade">hard upgrade</link>.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Bug fixes</title>
 
         <para>BUGFIX in SnapToGrid() computation of output bounding box</para>
         <para>jdbc2 SRID handling fixes in JTS code</para>
 
         <para>Fixed support for 64bit archs</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>New functionalities</title>
 
         <para>Regress tests can now be run *before* postgis
 
         <para>Embedded access control in estimated_extent() for builds against
         pgsql &gt;= 8.0.0</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other changes</title>
 
         <para>More portable ./configure script</para>
 
         <para>Changed ./run_test script to have more sane default
         behaviour</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.1.1</title>
 
       <para>Release date: 2006/01/23</para>
       preventing GeometryCollection objects to be used in topological
       operations.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.3 or later follow the
 
         <para>Upgrade from any release prior to 1.0.0RC6 requires an <link
         linkend="hard_upgrade">hard upgrade</link>.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Bug fixes</title>
 
         <para>Fixed a premature exit in postgis_restore.pl</para>
         <para>BUGFIX in line_substring()</para>
 
         <para>Added support for localized cluster in regress tester</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>New functionalities</title>
 
         <para>New Z and M interpolation in line_substring()</para>
         <para>New Z and M interpolation in line_interpolate_point()</para>
 
         <para>added NumInteriorRing() alias due to OpenGIS ambiguity</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.1.0</title>
 
       <para>Release date: 2005/12/21</para>
       GEOS-2.2.x before installing PostGIS, this will ensure future GEOS
       upgrades won't require a rebuild of the PostGIS library.</para>
 
-      <sect3>
+      <simplesect>
         <title>Credits</title>
 
         <para>This release includes code from Mark Cave Ayland for caching of
         Devrim GUNDUZ provided RPM specfiles. Carl Anderson helped with the
         new area building functions. See the <link
         linkend="credits">credits</link> section for more names.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.3 or later you
 
         <para>Upgrade from any release prior to 1.0.0RC6 requires an <link
         linkend="hard_upgrade">hard upgrade</link>.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>New functions</title>
 
         <para>scale() and transscale() companion methods to translate()</para>
         <para>RemovePoint(linestring, offset)</para>
 
         <para>ReplacePoint(linestring, offset, point)</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Bug fixes</title>
 
         <para>Fixed memory leak in polygonize()</para>
 
         <para>Fixed USE_GEOS, USE_PROJ and USE_STATS elements of
         postgis_version() output to always reflect library state.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Function semantic changes</title>
 
         <para>SnapToGrid doesn't discard higher dimensions</para>
 
         <para>Changed Z() function to return NULL if requested dimension is
         not available</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Performance improvements</title>
 
         <para>Much faster transform() function, caching proj4 objects</para>
 
         <para>Removed automatic call to fix_geometry_columns() in
         AddGeometryColumns() and update_geometry_stats()</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>JDBC2 works</title>
 
         <para>Makefile improvements</para>
         <para>fix EWKT constructors to accept SRID=4711; representation</para>
 
         <para>added preliminary read-only support for java2d geometries</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other new things</title>
 
         <para>Full autoconf-based configuration, with PostgreSQL source
         <para>Debian and RPM specfiles</para>
 
         <para>New lwpostgis_upgrade.sql script</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other changes</title>
 
         <para>JTS support improvements</para>
         <para>obsoleted direct use of postgis_proc_upgrade.pl</para>
 
         <para>scripts version unified with release version</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.0.6</title>
 
       <para>Release date: 2005/12/06</para>
 
       <para>Contains a few bug fixes and improvements.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.3 or later you
 
         <para>Upgrade from any release prior to 1.0.0RC6 requires an <link
         linkend="hard_upgrade">hard upgrade</link>.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Bug fixes</title>
 
         <para>Fixed palloc(0) call in collection deserializer (only gives
         <para>Fixed bug in segmentize()</para>
 
         <para>Fixed bbox computation of SnapToGrid output</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Improvements</title>
 
         <para>Initial support for postgresql 8.2</para>
 
         <para>Added missing SRID mismatch checks in GEOS ops</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.0.5</title>
 
       <para>Release date: 2005/11/25</para>
         conform to unix standards (return 0 on success).</para>
       </note>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.3 or later you
 
         <para>Upgrade from any release prior to 1.0.0RC6 requires an <link
         linkend="hard_upgrade">hard upgrade</link>.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Library changes</title>
 
         <para>Fixed memory alignment problems</para>
         <para>Speedup of serializer functions</para>
 
         <para>Fixed a bug in force_3dm(), force_3dz() and force_4d()</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Loader changes</title>
 
         <para>Fixed return code of shp2pgsql</para>
         attributes</para>
 
         <para>Segfault fix in shp2pgsql (utf8 encoding)</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other changes</title>
 
         <para>Schema aware postgis_proc_upgrade.pl, support for pgsql
         7.2+</para>
 
         <para>New "Reporting Bugs" chapter in manual</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.0.4</title>
 
       <para>Release date: 2005/09/09</para>
       particular, it fixes a memory leak preventing successful build of GiST
       indexes for large spatial tables.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.3 you <emphasis>DO
 
         <para>Upgrade from any release prior to 1.0.0RC6 requires an <link
         linkend="hard_upgrade">hard upgrade</link>.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Bug fixes</title>
 
         <para>Memory leak plugged in GiST indexing</para>
         <para>Fixed bug in MakeLine dimension handling</para>
 
         <para>Fixed bug in translate() corrupting output bounding box</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Improvements</title>
 
         <para>Documentation improvements</para>
         <para>GiST indexing cleanup</para>
 
         <para>Looser syntax acceptance in box3d parser</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2 id="rel_1.0.3_upgrading">
+    <sect1 id="rel_1.0.3_upgrading">
       <title>Release 1.0.3</title>
 
       <para>Release date: 2005/08/08</para>
       affecting correctness of stored geometries</emphasis> - and a few
       improvements.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>Due to a bug in a bounding box computation routine, the upgrade
         no args for syntax help). Optionally run utils/postgis_proc_upgrade.pl
         to refresh postgis procedures and functions signatures (see <link
         linkend="soft_upgrade">Soft upgrade</link>).</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Bug fixes</title>
 
         <para>Severe bugfix in lwgeom's 2d bounding box computation</para>
         <para>Bugfix in dumper handling of user-defined queries</para>
 
         <para>Bugfix in create_undef.pl script</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Improvements</title>
 
         <para>Small performance improvement in canonical input function</para>
         <para>Improvement in the postgis_restore.pl script</para>
 
         <para>New rebuild_bbox_caches.pl util script</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.0.2</title>
 
       <para>Release date: 2005/07/04</para>
 
       <para>Contains a few bug fixes and improvements.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.0RC6 or up you
         <para>Upgrading from older releases requires a dump/reload. See the
         <link linkend="upgrading">upgrading</link> chapter for more
         informations.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Bug fixes</title>
 
         <para>Fault tolerant btree ops</para>
 
         <para>Cleaner build scripts (avoided mix of CFLAGS and
         CXXFLAGS)</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Improvements</title>
 
         <para>New index creation capabilities in loader (-I switch)</para>
 
         <para>Initial support for postgresql 8.1dev</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.0.1</title>
 
       <para>Release date: 2005/05/24</para>
 
       <para>Contains a few bug fixes and some improvements.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.0RC6 or up you
         <para>Upgrading from older releases requires a dump/reload. See the
         <link linkend="upgrading">upgrading</link> chapter for more
         informations.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Library changes</title>
 
         <para>BUGFIX in 3d computation of length_spheroid()</para>
 
         <para>BUGFIX in join selectivity estimator</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other changes/additions</title>
 
         <para>BUGFIX in shp2pgsql escape functions</para>
         <para>BUGFIX in Paris projections definitions</para>
 
         <para>postgis_restore.pl cleanups</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.0.0</title>
 
       <para>Release date: 2005/04/19</para>
       in the loader (most notably support for older postgis versions), and
       more docs.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.0RC6 you <emphasis>DO
         <para>Upgrading from any other precedent release requires a
         dump/reload. See the <link linkend="upgrading">upgrading</link>
         chapter for more informations.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Library changes</title>
 
         <para>BUGFIX in transform() releasing random memory address</para>
 
         <para>BUGFIX in join selectivity estimator (defaults, leaks,
         tuplecount, sd)</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other changes/additions</title>
 
         <para>BUGFIX in shp2pgsql escape of values starting with tab or
 
         <para>BUGFIX in estimator testers (support for LWGEOM and schema
         parsing)</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.0.0RC6</title>
 
       <para>Release date: 2005/03/30</para>
       <para>Sixth release candidate for 1.0.0. Contains a few bug fixes and
       cleanups.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>You need a dump/reload to upgrade from precedent releases. See
         the <link linkend="upgrading">upgrading</link> chapter for more
         informations.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Library changes</title>
 
         <para>BUGFIX in multi()</para>
 
         <para>early return [when noop] from multi()</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Scripts changes</title>
 
         <para>dropped {x,y}{min,max}(box2d) functions</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other changes</title>
 
         <para>BUGFIX in postgis_restore.pl scrip</para>
 
         <para>BUGFIX in dumper's 64bit support</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.0.0RC5</title>
 
       <para>Release date: 2005/03/25</para>
       <para>Fifth release candidate for 1.0.0. Contains a few bug fixes and a
       improvements.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>If you are upgrading from release 1.0.0RC4 you <emphasis>DO
         <para>Upgrading from any other precedent release requires a
         dump/reload. See the <link linkend="upgrading">upgrading</link>
         chapter for more informations.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Library changes</title>
 
         <para>BUGFIX (segfaulting) in box3d computation (yes,
         another!).</para>
 
         <para>BUGFIX (segfaulting) in estimated_extent().</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other changes</title>
 
         <para>Small build scripts and utilities refinements.</para>
 
         <para>Additional performance tips documented.</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.0.0RC4</title>
 
       <para>Release date: 2005/03/18</para>
       <para>Fourth release candidate for 1.0.0. Contains bug fixes and a few
       improvements.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>You need a dump/reload to upgrade from precedent releases. See
         the <link linkend="upgrading">upgrading</link> chapter for more
         informations.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Library changes</title>
 
         <para>BUGFIX (segfaulting) in geom_accum().</para>
         <para>Consistency check fix in SnapToGrid().</para>
 
         <para>Box2d output changed back to 15 significant digits.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Scripts changes</title>
 
         <para>NEW distance_sphere() function.</para>
 
         <para>Changed get_proj4_from_srid implementation to use PL/PGSQL
         instead of SQL.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other changes</title>
 
         <para>BUGFIX in loader and dumper handling of MultiLine shapes</para>
         <para>improved version handling, central Version.config</para>
 
         <para>improvements in postgis_restore.pl</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.0.0RC3</title>
 
       <para>Release date: 2005/02/24</para>
       <para>Third release candidate for 1.0.0. Contains many bug fixes and
       improvements.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>You need a dump/reload to upgrade from precedent releases. See
         the <link linkend="upgrading">upgrading</link> chapter for more
         informations.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Library changes</title>
 
         <para>BUGFIX in transform(): missing SRID, better error
 
         <para>Reduced memory usage by early releasing query-context palloced
         one.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Scripts changes</title>
 
         <para>BUGFIX in 72 index bindings.</para>
 
         <para>Some functions made IMMUTABLE from STABLE, for performance
         improvement.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>JDBC changes</title>
 
         <para>jdbc2: small patches, box2d/3d tests, revised docs and
         servers.</para>
 
         <para>jdbc2: Fixed handling of measured geometries in EWKT.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other changes</title>
 
         <para>new performance tips chapter in manual</para>
 
         <para>spatial_ref_sys: changed Paris entries to match the ones
         distributed with 0.x.</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.0.0RC2</title>
 
       <para>Release date: 2005/01/26</para>
       <para>Second release candidate for 1.0.0 containing bug fixes and a few
       improvements.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>You need a dump/reload to upgrade from precedent releases. See
         the <link linkend="upgrading">upgrading</link> chapter for more
         informations.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Library changes</title>
 
         <para>BUGFIX in pointarray box3d computation</para>
         <para>Faster binary outputs</para>
 
         <para>Stricter OGC WKB/WKT constructors</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Scripts changes</title>
 
         <para>More correct STABLE, IMMUTABLE, STRICT uses in
         lwpostgis.sql</para>
 
         <para>stricter OGC WKB/WKT constructors</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Other changes</title>
 
         <para>Faster and more robust loader (both i18n and not)</para>
 
         <para>Initial autoconf script</para>
-      </sect3>
-    </sect2>
+      </simplesect>
+    </sect1>
 
-    <sect2>
+    <sect1>
       <title>Release 1.0.0RC1</title>
 
       <para>Release date: 2005/01/13</para>
       internal storage of postgis types redesigned to be smaller and faster on
       indexed queries.</para>
 
-      <sect3>
+      <simplesect>
         <title>Upgrading</title>
 
         <para>You need a dump/reload to upgrade from precedent releases. See
         the <link linkend="upgrading">upgrading</link> chapter for more
         informations.</para>
-      </sect3>
+      </simplesect>
 
-      <sect3>
+      <simplesect>
         <title>Changes</title>
 
         <para>Faster canonical input parsing.</para>
         <para>PostGIS extension API.</para>
 
         <para>UTF8 support in loader.</para>
-      </sect3>
-    </sect2>
-  </sect1>
+      </simplesect>
+    </sect1>
 </appendix>
\ No newline at end of file
diff --git a/doc/template.xml b/doc/template.xml
new file mode 100644 (file)
index 0000000..cf08c4f
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<refentry id="ST_MyMethod">
+
+  <refnamediv>
+    <refname>ST_MyMethod</refname>
+
+    <refpurpose>Returns something useful</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcprototype>
+        <funcdef>boolean <function>ST_MyMethod</function></funcdef>
+        <paramdef><type>Geometry </type> <parameter>g1</parameter></paramdef>
+        <paramdef><type>Geometry </type> <parameter>g2</parameter></paramdef>
+      </funcprototype>
+
+      <!-- an optional second method prototype -->
+      <funcprototype>
+        <funcdef>boolean <function>ST_MyMethod</function></funcdef>
+        <paramdef><type>Geometry </type> <parameter>g1</parameter></paramdef>
+        <paramdef><type>Geometry </type> <parameter>g2</parameter></paramdef>
+        <paramdef><type>varchar </type> <parameter>myparam</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsection>
+    <title>Description</title>
+
+    <para>Some useful description here.</para>
+
+    <!-- optionally mention that this function uses indexes if appropriate -->
+    <note>
+      <para>This function call will automatically include a bounding box
+      comparison that will make use of any indexes that are available on the
+      geometries.</para>
+    </note>
+
+    <!-- optionally mention OpenGIS compliancy if appropriate -->
+    <para>
+      <inlinegraphic class="sfs_compliant" fileref="images/check.png" />
+      This method implements the
+      <ulink url="http://www.opengeospatial.org/standards/sfs">OpenGIS Simple
+      Features Implementation Specification for SQL</ulink>
+    </para>
+
+    <!-- optionally mention SQL/MM compliancy if appropriate -->
+    <para>
+      <inlinegraphic class="sql_mm_compliant" fileref="images/check.png" />
+      This method implements the SQL/MM specification: SQL-MM 3: 5.1.23
+    </para> 
+
+  </refsection>
+
+  <refsection>
+    <title>Examples</title>
+
+    <programlisting></programlisting>
+  </refsection>
+  
+  <!-- Optionally add a "See Also" section -->
+  <refsection>
+    <title>See Also</title>
+
+    <para><xref linkend="ST_MyMethod2"/>, ...</para>
+  </refsection>
+  
+</refentry>
\ No newline at end of file