From adb55db511e611bccd5b91c2660acd3427ad7e42 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Tue, 15 Jul 2008 19:38:11 +0000 Subject: [PATCH] Move ST_Equals, ST_OrderingEquals - provide examples. Make Geometry - geometry git-svn-id: http://svn.osgeo.org/postgis/trunk@2857 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/reference.xml | 36 ----------- doc/reference_new.xml | 147 ++++++++++++++++++++++++++++++++++++++++-- doc/template.xml | 8 +-- 3 files changed, 145 insertions(+), 46 deletions(-) diff --git a/doc/reference.xml b/doc/reference.xml index ba5b918c3..41f8a4f8e 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -189,25 +189,6 @@ - - ST_Intersects(geometry, geometry) - - - Returns 1 (TRUE) if the Geometries "spatially - intersect". - - Performed by the GEOS module - - Do not call with a GeometryCollection as an argument - - NOTE: this is the "allowable" version that returns a - boolean, not an integer. - - OGC SPEC s2.1.1.2 // s2.1.13.3 - NOT disjoint(geometry, - geometry) - - - ST_Relate(geometry, geometry, intersectionPatternMatrix) @@ -3176,23 +3157,6 @@ WHERE n*100.00/length < 1; - - ST_OrderingEquals - - - ST_OrderingEquals compares two geometries and t (TRUE) if the - geometries are equal and the coordinates are in the same order; - otherwise it returns f (FALSE). - - - This function is implemented as per the ArcSDE SQL - specification rather than SQL-MM. - http://edndoc.esri.com/arcsde/9.1/sql_api/sqlapi3.htm#ST_OrderingEquals - - - SQL-MM 3: 5.1.43 - - ST_Overlaps diff --git a/doc/reference_new.xml b/doc/reference_new.xml index 6d6232f53..38a6202bf 100644 --- a/doc/reference_new.xml +++ b/doc/reference_new.xml @@ -276,7 +276,7 @@ Check constraints: UpdateGeometrySRID Updates the SRID of all features in a geometry - column and also corrects the geometry_columns table and corrects the geometry constraints on the table. + column, geometry_columns metadata and srid table constraint @@ -360,15 +360,15 @@ Check constraints: - Geometry ST_MakeLine - Geometry set pointfield + geometry ST_MakeLine + geometry set pointfield - Geometry ST_MakeLine - Geometry point1 - Geometry point2 + geometry ST_MakeLine + geometry point1 + geometry point2 @@ -676,6 +676,69 @@ SELECT DISTINCT ON (s.gid) s.gid, s.school_name, s.the_geom, h.hospital_name + + + + ST_Equals + + Returns true if the given geometries represent the same geometry. Directionality + is ignored. + + + + + + boolean ST_Equals + geometry A + geometry B + + + + + + Description + + Returns TRUE if the given Geometries are "spatially + equal". Use this for a 'better' answer than '='. + Note by spatially equal we also mean ordering of points can be different but + represent the same geometry structure. To verify the order of points is consistent, use + ST_OrderingEquals. + + + + This method implements the + OpenGIS Simple + Features Implementation Specification for SQL OGC SPEC s2.1.1.2< + + + + + + Examples + + SELECT ST_Equals(ST_GeomFromText('LINESTRING(0 0, 10 10)'), + ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10)')); + st_equals +----------- + t +(1 row) + +SELECT ST_Equals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')), + ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10)')); + st_equals +----------- + t +(1 row) + + + + + See Also + + , + + + @@ -750,6 +813,78 @@ SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry ST_Disjoint + + + ST_OrderingEquals + + Returns true if the given geometries represent the same geometry + and points are in the same directional order. + + + + + + boolean ST_OrderingEquals + geometry A + geometry B + + + + + + Description + + ST_OrderingEquals compares two geometries and t (TRUE) if the + geometries are equal and the coordinates are in the same order; + otherwise it returns f (FALSE). + + + This function is implemented as per the ArcSDE SQL + specification rather than SQL-MM. + http://edndoc.esri.com/arcsde/9.1/sql_api/sqlapi3.htm#ST_OrderingEquals + + + + + This method implements the SQL/MM specification: SQL-MM 3: 5.1.43 + + + + + + Examples + + SELECT ST_OrderingEquals(ST_GeomFromText('LINESTRING(0 0, 10 10)'), + ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10)')); + st_orderingequals +----------- + f +(1 row) + +SELECT ST_OrderingEquals(ST_GeomFromText('LINESTRING(0 0, 10 10)'), + ST_GeomFromText('LINESTRING(0 0, 0 0, 10 10)')); + st_orderingequals +----------- + t +(1 row) + +SELECT ST_OrderingEquals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')), + ST_GeomFromText('LINESTRING(0 0, 0 0, 10 10)')); + st_orderingequals +----------- + f +(1 row) + + + + + + See Also + + , + + + diff --git a/doc/template.xml b/doc/template.xml index cf08c4fef..d9b9be68a 100644 --- a/doc/template.xml +++ b/doc/template.xml @@ -11,15 +11,15 @@ boolean ST_MyMethod - Geometry g1 - Geometry g2 + geometry g1 + geometry g2 boolean ST_MyMethod - Geometry g1 - Geometry g2 + geometry g1 + geometry g2 varchar myparam -- 2.50.1