]> granicus.if.org Git - postgis/commitdiff
add ST_Intersects proto for geography
authorRegina Obe <lr@pcorp.us>
Tue, 10 Nov 2009 12:08:21 +0000 (12:08 +0000)
committerRegina Obe <lr@pcorp.us>
Tue, 10 Nov 2009 12:08:21 +0000 (12:08 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4771 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference.xml

index 2b0db66b63ab6c881c19f84b3206a4e52f569146..1836ee95061b7e4783cbcb23e09d2d8bf7120122 100644 (file)
@@ -10853,8 +10853,9 @@ SELECT ST_Equals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')),
                <refnamediv>
                        <refname>ST_Intersects</refname>
 
-                       <refpurpose>Returns TRUE if the Geometries "spatially
+                       <refpurpose>Returns TRUE if the Geometries/Geography "spatially
                        intersect" - (share any portion of space) and FALSE if they don't (they are Disjoint).
+                       For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect)
                        </refpurpose>
                </refnamediv>
                <refsynopsisdiv>
@@ -10863,11 +10864,22 @@ SELECT ST_Equals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')),
                                        <funcdef>boolean <function>ST_Intersects</function></funcdef>
                                        <paramdef>
                                                <type>geometry</type>
-                                               <parameter>A</parameter>
+                                               <parameter>geomA</parameter>
                                        </paramdef>
                                        <paramdef>
                                                <type>geometry</type>
-                                               <parameter>B</parameter>
+                                               <parameter>geomB</parameter>
+                                       </paramdef>
+                               </funcprototype>
+                               <funcprototype>
+                                       <funcdef>boolean <function>ST_Intersects</function></funcdef>
+                                       <paramdef>
+                                               <type>geography</type>
+                                               <parameter>geogA</parameter>
+                                       </paramdef>
+                                       <paramdef>
+                                               <type>geography</type>
+                                               <parameter>geogB</parameter>
                                        </paramdef>
                                </funcprototype>
                        </funcsynopsis>
@@ -10879,15 +10891,20 @@ SELECT ST_Equals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')),
                                Disjoint implies false for spatial intersection.</para>
 
          <important>
-               <para>Do not call with a <varname>GEOMETRYCOLLECTION</varname> as an argument</para>
+               <para>Do not call with a <varname>GEOMETRYCOLLECTION</varname> as an argument for geometry version.  The geography
+                       version supports GEOMETRYCOLLECTION since its a thin wrapper around distance implementation.</para>
          </important>
 
-                       <para>Performed by the GEOS module</para>
+                       <para>Performed by the GEOS module (for geometry), geography is native</para>
+                       <para>Availability: 1.5 support for geography was introduced.</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>
+                       <note>
+                         <para>For geography, this function has a distance tolerance of about 0.00001 meters and uses the sphere rather
+                               than spheroid calculation.</para>
                        </note>
                        <note>
                          <para>NOTE: this is the "allowable" version that returns a
@@ -10909,7 +10926,7 @@ SELECT ST_Equals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')),
                        SQL-MM 3: 5.1.27</para>
                </refsection>
                <refsection>
-               <title>Examples</title>
+               <title>Geometry Examples</title>
 <programlisting>SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry);
  st_intersects
 ---------------
@@ -10921,6 +10938,18 @@ SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry
  t
 (1 row)
                </programlisting>
+               </refsection>
+               <refsection>
+               <title>Geography Examples</title>
+<programlisting>SELECT ST_Intersects(
+               ST_GeographyFromText('SRID=4326;LINESTRING(-43.23456 72.4567,-43.23456 72.4568)'),
+               ST_GeographyFromText('SRID=4326;POINT(-43.23456 72.4567772)')
+               );
+
+ st_intersects
+---------------
+t
+</programlisting>
                </refsection>
                <refsection>
                        <title>See Also</title>