mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-23 16:42:35 +00:00
Really accept collections and multipoints from ST_MakeValid (#1719)
Also updates documentation and SQL level tests. git-svn-id: http://svn.osgeo.org/postgis/trunk@9894 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
6743c67e8f
commit
930fb6770d
|
@ -1581,7 +1581,9 @@ SELECT ST_AsEWKT(ST_LineToCurve(ST_GeomFromEWKT('LINESTRING(1 2 3, 3 4 8, 5 6 4,
|
|||
</para>
|
||||
|
||||
<para>
|
||||
Supported inputs are: LINESTRINGS, MULTILINESTRINGS, POLYGONS, MULTIPOLYGONS.
|
||||
Supported inputs are: POINTS, MULTIPOINTS, LINESTRINGS,
|
||||
MULTILINESTRINGS, POLYGONS, MULTIPOLYGONS and GEOMETRYCOLLECTIONS
|
||||
containing any mix of them.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
@ -1594,7 +1596,7 @@ SELECT ST_AsEWKT(ST_LineToCurve(ST_GeomFromEWKT('LINESTRING(1 2 3, 3 4 8, 5 6 4,
|
|||
Single polygons may become multi-geometries in case of self-intersections.
|
||||
</para>
|
||||
|
||||
<para>Availability: 2.0.0, requires GEOS-3.3.0 or higher.</para>
|
||||
<para>Availability: 2.0.0, requires GEOS-3.3.0 or higher. 2.1.0 added support for GEOMETRYCOLLECTION and MULTIPOINT.</para>
|
||||
|
||||
<para>&Z_support;</para>
|
||||
|
||||
|
|
|
@ -68,10 +68,12 @@ Datum ST_MakeValid(PG_FUNCTION_ARGS)
|
|||
switch ( lwgeom_in->type )
|
||||
{
|
||||
case POINTTYPE:
|
||||
case MULTIPOINTTYPE:
|
||||
case LINETYPE:
|
||||
case POLYGONTYPE:
|
||||
case MULTILINETYPE:
|
||||
case MULTIPOLYGONTYPE:
|
||||
case COLLECTIONTYPE:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -46,5 +46,7 @@ SELECT origin,caseno,
|
|||
|
||||
|
||||
SELECT '#1719.1', ST_AsEWKT(ST_MakeValid('POINT(0 0)'));
|
||||
SELECT '#1719.2', ST_AsEWKT(ST_MakeValid('GEOMETRYCOLLECTION(POINT(0 0),MULTIPOINT(3 4,5 2),LINESTRING(4 4, 4 4),POLYGON((0 0,10 10,0 10,10 0,0 0)))'));
|
||||
SELECT '#1719.3', ST_AsEWKT(ST_MakeValid('MULTIPOINT(3 4,5 2)'));
|
||||
|
||||
DROP TABLE clean_cases;
|
||||
|
|
|
@ -27,3 +27,5 @@ PG|3|t|t|f
|
|||
PG|4|t|t|f
|
||||
PG|5|t|t|f
|
||||
#1719.1|POINT(0 0)
|
||||
#1719.2|GEOMETRYCOLLECTION(POINT(0 0),MULTIPOINT(3 4,5 2),POINT(4 4),MULTIPOLYGON(((0 0,5 5,10 0,0 0)),((5 5,0 10,10 10,5 5))))
|
||||
#1719.3|MULTIPOINT(3 4,5 2)
|
||||
|
|
Loading…
Reference in a new issue