Closed roarbra closed 7 months ago
The more recent OverlayNG algorithm is more robust. See the doc for how to enable it via a command-line switch, or use the OverlayNGRobust
entry point directly.
Also, are you sure you understand how the PrecisionModel scale factor works? It is the reciprocal of the grid size. So a scale factor of 1 rounds to integers, and a scale factor of 0.1 rounds to the nearest 10 (not to the first decimal place). Using scale factors < 1 is unusual.
Also, are you sure you understand how the PrecisionModel scale factor works? It is the reciprocal of the grid size. So a scale factor of 1 rounds to integers, and a scale factor of 0.1 rounds to the nearest 10 (not to the first decimal place). Using scale factors < 1 is unusual.
Yes, that was what I understood from the docs. And you can see it from the exception message as well.
The more recent OverlayNG algorithm is more robust. See the doc for how to enable it via a command-line switch, or use the
OverlayNGRobust
entry point directly.
Yes, this seems to work a lot better. I will try to set that command-line switch in the startup of GeoServer. In which version was this added?
Solved by setting -Djts.overlay=ng in Geoserver startup.
I'm having two polygons, where one is totally within the other. When I try to make a call
outer.intersection(inner)
I would assume to get the inner as a result. Instead I get a TopologyException. In the FAQ I saw something about using the PresicionModel of the GeometryFactory to minimize the scale, and so I implemented a tiny little program that would test that. The essential part is here:I've experienced with the scale from 1.0 - 0.0001 and here are the results: scale = 1.0
scale = 0.1
scale = 0.01
scale = 0.001
scale = 0.0001
This isn't what I would call robust. The whole program with the polygons is available as a gist.