Closed adrianmfi closed 1 year ago
Yep that looks like bug.
A similar call to the buffer function here throws a similar error if jsts is delivered as an es module. https://github.com/bjornharrtell/jsts/blob/f30d48ed7386889a19ea897b63fbd538d990851a/src/org/locationtech/jts/simplify/DouglasPeuckerSimplifier.js#L56
Fix upstream patch here https://github.com/bjornharrtell/jts/commit/f785d7e4b42b668092e4536e7d40131fb94bd930.
If
OverlapUnion.unionFull
fails with a topology exception, it falls back to usingbuffer
, which is not a function on geometryStack trace
I think this should fix the issue, but I'm not confident enough to open a PR
I am able to work around the issue by reducing the precision of my input polygons with
GeometryPrecisionReducer
.