<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>
<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>
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
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
---------------
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>