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 _______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel