[geos-devel] MakeValid and empty collection component
Even Rouault
even.rouault at spatialys.com
Wed Dec 9 16:35:17 PST 2020
On mercredi 9 décembre 2020 12:13:17 CET Sandro Santilli wrote:
> I found out that GEOSMakeValid will remove EMPTY components from
> collections. The PostGIS implementation of it does not do this.
>
> The rationale was that a collection with EMPTY component is NOT
> invalid as per OGC specification, so why removing them ? Isn't
> that a job for CollectionHomogenize or similar ?
Actually the unit tests have checks for this.
See tests/xmltester/tests/misc/makevalid.xml
<case>
<desc>makevalid/geometry_collection</desc>
<a>GEOMETRYCOLLECTION(POINT EMPTY,LINESTRING EMPTY,POLYGON((0 0,0 1,1 1,1
0,0 0),(0 0.5,0.5 0.1,1 0.5,0 0.5)))</a>
<test>
<op name="makevalid" arg1="a">
GEOMETRYCOLLECTION (MULTIPOLYGON (((0.0 0.0, 0.0 0.5, 0.5 0.1, 1.0
0.5, 1.0 0.0, 0.0 0.0)), ((0.0 0.5, 0.0 1.0, 1.0 1.0, 1.0 0.5, 0.0
0.5))),LINESTRING EMPTY, POINT EMPTY)
</op>
</test>
</case>
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the geos-devel
mailing list