#4956 closed defect (fixed)
ST_Boundary(colllection) -> ERROR: MultiLineString cannot contain MultiLineString element
Reported by: | strk | Owned by: | komzpa |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 3.2.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
Confusing error from this query:
select ST_Boundary('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2)),POLYGON((2 2,2 4,4 4,4 2,2 2)))'::geometry);
Note that if the first polygon doesn't have an hole the routine returns an answer. Pretty confusing …
This only happens in 3.2.0dev, as in the 3.1 branch we get a nice and understandable message:
ERROR: GEOSBoundary: IllegalArgumentException: Operation not supported by GeometryCollection
Both installs are using GEOS-3.10.0dev
Change History (5)
comment:1 by , 3 years ago
Owner: | changed from | to
---|
comment:2 by , 3 years ago
Darafei I think this would do: https://gitlab.com/postgis/postgis/-/merge_requests/50
It needs a careful review of memory management and proper tests (unit and regress)
comment:3 by , 3 years ago
Priority: | medium → blocker |
---|
Note:
See TracTickets
for help on using tickets.
The problem is that lwgeom_boundary assumes a GEOMETRYCOLLECTION will always only have elements having a LINESTRING as a boundary. This is not the case in the example above (first element has a MULTILINESTRING boundary) and is also not the case when elements of the collections are for example linestrings, example:
Darafei it was your change in [6316fa32e8e8d027d6cf09f683dabef024450403/git] unleashing this