Closed systemed closed 8 months ago
I have reverted #581 for now. This solves the hangs we were seeing (e.g. #592) though at the cost of some geometry breakage. The commit in correct
that causes the hangs is https://github.com/kleunen/boost_geometry_correct/commit/008154ab8116f8399b29e322e012ee8ddb0b13c4.
Clipping seems to be in a good state at the moment thanks to falling back to boost::geometry::intersection and proactively filtering out small rings. I'll therefore close this but it may be a useful collection of links for the future.
This is an umbrella issue to summarise current clipping issues with tilemaker.
History:
482 introduced the Sutherland-Hodgman algorithm for clipping polygons. This is many times faster than boost::geometry's
intersection
, but can leave line artefacts (0-width borders) around the clipping rectangle.575 uses kleunen's custom correct code (
make_valid
) to eliminate these borders581 updates to the latest version of this code
Current status:
make_valid
operations are taking too long to finish (#592, #580)The most obvious solution is to move to a clipping algorithm which is still fast but doesn't produce degenerate geometries. Some options:
Other possible fixes/improvements:
boost::geometry::intersection
(slower but doesn't create artefacts)correct
that's causing it to be so slowcorrect
, without aborting tile writingcorrect
after a certain length of timeKnown problem locations: