From f32421c617144bb9a75e8aac27eeac6e87c9205c Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Tue, 10 Nov 2009 12:08:21 +0000 Subject: [PATCH] add ST_Intersects proto for geography git-svn-id: http://svn.osgeo.org/postgis/trunk@4771 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/reference.xml | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/doc/reference.xml b/doc/reference.xml index 2b0db66b6..1836ee950 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -10853,8 +10853,9 @@ SELECT ST_Equals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')), ST_Intersects - Returns TRUE if the Geometries "spatially + 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) @@ -10863,11 +10864,22 @@ SELECT ST_Equals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')), boolean ST_Intersects geometry - A + geomA geometry - B + geomB + + + + boolean ST_Intersects + + geography + geogA + + + geography + geogB @@ -10879,15 +10891,20 @@ SELECT ST_Equals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')), Disjoint implies false for spatial intersection. - Do not call with a GEOMETRYCOLLECTION as an argument + Do not call with a GEOMETRYCOLLECTION as an argument for geometry version. The geography + version supports GEOMETRYCOLLECTION since its a thin wrapper around distance implementation. - Performed by the GEOS module + Performed by the GEOS module (for geometry), geography is native + Availability: 1.5 support for geography was introduced. This function call will automatically include a bounding box comparison that will make use of any indexes that are available on the geometries. - + + + For geography, this function has a distance tolerance of about 0.00001 meters and uses the sphere rather + than spheroid calculation. 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 - Examples + Geometry Examples 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) + + + Geography Examples +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 + See Also -- 2.50.1