From: Regina Obe Date: Wed, 10 Sep 2008 11:28:37 +0000 (+0000) Subject: Move over ST_IsValid and provide example X-Git-Tag: 1.4.0b1~752 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df38dcbc61a42fbed80798cad7c0df3cf79e720e;p=postgis Move over ST_IsValid and provide example git-svn-id: http://svn.osgeo.org/postgis/trunk@2952 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference.xml b/doc/reference.xml index 952c121d2..8bc9cf3e4 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -1552,14 +1552,6 @@ WHERE n*100.00/length < 1; - - ST_isvalid(geometry) - - - returns true if this geometry is valid. - - - ST_expand(geometry, float) @@ -1942,23 +1934,6 @@ WHERE n*100.00/length < 1; - - ST_IsValid - - - Test if an ST_Geometry value is well formed. - - - SQL-MM defines the result of ST_IsValid(NULL) to be 0, while - PostGIS returns NULL. - - - SQL-MM defines the result of ST_IsValid(NULL) to be 1 - - SQL-MM 3: 5.1.9 - - - ST_LineFromText diff --git a/doc/reference_new.xml b/doc/reference_new.xml index 9be6d61a2..e9672aa79 100644 --- a/doc/reference_new.xml +++ b/doc/reference_new.xml @@ -1926,7 +1926,22 @@ postgis=# SELECT ST_EndPoint('POINT(1 1)'::geometry) IS NULL AS is_null; - + + ST_IsValid + + + Test if an ST_Geometry value is well formed. + + + SQL-MM defines the result of ST_IsValid(NULL) to be 0, while + PostGIS returns NULL. + + + SQL-MM defines the result of ST_IsValid(NULL) to be 1 + + SQL-MM 3: 5.1.9 + + ST_IsClosed @@ -2014,6 +2029,72 @@ postgis=# SELECT ST_IsClosed('MULTIPOINT((0 0), (1 1))'::geometry); + + + + ST_IsValid + + Returns true if the + ST_Geometry is well formed. + + + + + + + boolean ST_IsValid + + geometry g + + + + + + Description + + Test if an ST_Geometry value is well formed. For geometries that are invalid, + the PostgreSQL NOTICE will provide details of why it is not valid. + + SQL-MM defines the result of ST_IsValid(NULL) to be 0, while + PostGIS returns NULL. + + + + + + + This method implements the OpenGIS Simple Features + Implementation Specification for SQL. + + + + + + This method implements the SQL/MM specification: + SQL-MM 3: 5.1.9 + + + + + Examples + + SELECT ST_IsValid(ST_GeomFromText('LINESTRING(0 0, 1 1)')) As good_line, + ST_IsValid(ST_GeomFromText('POLYGON((0 0, 1 1, 1 2, 1 1, 0 0))')) As bad_poly +--results +NOTICE: Self-intersection at or near point 0 0 + good_line | bad_poly +-----------+---------- + t | f + + + + + See Also + + + +