From: Regina Obe Date: Thu, 4 Sep 2008 11:56:48 +0000 (+0000) Subject: Move over ST_Overlaps to new reference section and provide some examples X-Git-Tag: 1.4.0b1~770 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bac3ac995b9d1de70842fcf4f0d1557129f197a5;p=postgis Move over ST_Overlaps to new reference section and provide some examples git-svn-id: http://svn.osgeo.org/postgis/trunk@2934 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference.xml b/doc/reference.xml index 01d4f8e43..17df10ccf 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -24,29 +24,6 @@ - - ST_Overlaps(A geometry, B geometry) - - - Returns TRUE if the Geometries "spatially - overlap". - - Performed by the GEOS module - - Do not call with a GeometryCollection as an argument - - This function call will automatically include a bounding box - comparison that will make use of any indexes that are available on - the geometries. To avoid index use, use the function - _ST_Overlaps. - - NOTE: this is the "allowable" version that returns a - boolean, not an integer. - - OGC SPEC s2.1.1.2 // s2.1.13.3 - - - ST_Contains(A geometry, B geometry) @@ -2177,17 +2154,6 @@ WHERE n*100.00/length < 1; - - ST_Overlaps - - - Test if an ST_Geometry value spatially overlays another - ST_Geometry value. - - SQL-MM 3: 5.1.32 - - - ST_Point diff --git a/doc/reference_new.xml b/doc/reference_new.xml index 8bead3f4e..c248f7bf4 100644 --- a/doc/reference_new.xml +++ b/doc/reference_new.xml @@ -3937,13 +3937,104 @@ SELECT ST_OrderingEquals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')), f (1 row) - + + + See Also + + + + + + + ST_Overlaps + + Returns TRUE if the Geometries share space, are of the same dimension, but are not completely contained by each other. + + + + + + boolean ST_Overlaps + geometry A + geometry B + + + + + + Description + + Returns TRUE if the Geometries "spatially + overlap". By that we mean they intersect, but one does not completely contain another. + + Performed by the GEOS module + + Do not call with a GeometryCollection as an argument + This function call will automatically include a bounding box + comparison that will make use of any indexes that are available on + the geometries. To avoid index use, use the function + _ST_Overlaps. + + NOTE: this is the "allowable" version that returns a + boolean, not an integer. + + OGC SPEC s2.1.1.2 // s2.1.13.3 + + + + This method implements the SQL/MM specification: SQL-MM 3: 5.1.32 + + + + + + Examples + + --a point on a line is contained by the line and is of a lower dimension, and therefore does not overlap the line + nor crosses + +SELECT ST_Overlaps(a,b) As a_overlap_b, + ST_Crosses(a,b) As a_crosses_b, + ST_Intersects(a, b) As a_intersects_b, ST_Contains(b,a) As b_contains_a +FROM (SELECT ST_GeomFromText('POINT(1 0.5)') As a, ST_GeomFromText('LINESTRING(1 0, 1 1, 3 5)') As b) + As foo + +a_overlap_b | a_crosses_b | a_intersects_b | b_contains_a +------------+-------------+----------------+-------------- +f | f | t | t + +--a line that is partly contained by circle, but not fully is defined as intersecting and crossing, +-- but since of different dimension it does not overlap +SELECT ST_Overlaps(a,b) As a_overlap_b, ST_Crosses(a,b) As a_crosses_b, + ST_Intersects(a, b) As a_intersects_b, + ST_Contains(a,b) As a_contains_b +FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 0.5)'), 3) As a, ST_GeomFromText('LINESTRING(1 0, 1 1, 3 5)') As b) + As foo; + + a_overlap_b | a_crosses_b | a_intersects_b | a_contains_b +-------------+-------------+----------------+-------------- + f | t | t | f + + -- a 2-dimensional bent hot dog (aka puffered line string) that intersects a circle, + -- but is not fully contained by the circle is defined as overlapping since they are of the same dimension, +-- but it does not cross, because the intersection of the 2 is of the same dimension +-- as the maximum dimension of the 2 + +SELECT ST_Overlaps(a,b) As a_overlap_b, ST_Crosses(a,b) As a_crosses_b, ST_Intersects(a, b) As a_intersects_b, ST_Contains(b,a) As b_contains_a, ST_Dimension(a) As dim_a, ST_Dimension(b) as dim_b +FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 0.5)'), 3) As a, ST_Buffer(ST_GeomFromText('LINESTRING(1 0, 1 1, 3 5)'),0.5) As b) + As foo; + +a_overlap_b | a_crosses_b | a_intersects_b | b_contains_a | dim_a | dim_b +------------+-------------+----------------+--------------+-------+------- +t | f | t | f | 2 | 2 + + See Also - , + , ,