[geos-devel] MakeValid and empty collection component
Sandro Santilli
strk at kbt.io
Thu Dec 10 06:48:38 PST 2020
On Thu, Dec 10, 2020 at 12:16:40PM +0100, Sandro Santilli wrote:
> On Thu, Dec 10, 2020 at 12:08:58PM +0100, Sandro Santilli wrote:
>
> > Odd, for a MULTIPOINT with empty components it seems to strip it.
> > But I cannot add the test because it looks like EMPTY is not accepted
> > in WKT:
> >
> > MULTIPOINT(EMPTY,1 1,EMPTY,0 0)
> > ParseException: Expected number but encountered word: 'EMPTY')
>
> Ok, figured: it's just the PostGIS->GEOS->PostGIS roundtrip conversion
> dropping those components !
>
> strk=# select ST_AsText(postgis_geos_noop('GEOMETRYCOLLECTION(POINT EMPTY, POINT(1 1))'));
> st_astext
> --------------------------------
> GEOMETRYCOLLECTION(POINT(1 1))
> (1 row)
>
> So, not related to GEOSMakeValid per-se, just with the adapter...
For the record, in case anyone wants to follow:
https://trac.osgeo.org/postgis/ticket/4814
To be noted that actually passing those empty components
to GEOS exposes crashes in GEOS (more on the ticket above)
--strk;
More information about the geos-devel
mailing list