2

Is there an in-the-can solution for simplifying a boundary that won't intersect the original poly?

Something like .convex_hull but with a fillet option possibly?

For example, .simplify() produces variations (depending on the arg magnitude) of this:

enter image description here

and .exterior just gives me the outline.

If I buffer then simplify the buffer (purple, below), I get something that is satisfactory:

enter image description here

But not exactly what I'm looking for and only after iterating buffer and simplification args and multiple manual inspections.

While I could write a test for intersection and incrementally iterate buff and/or simplification args until it passes, I figured I'd check if there was already something out there.

1

1 Answer 1

1

GEOS recently added PolygonHullSimplify, which constructs inner and outer hulls of polygons using a simplification tolerance. See this blog post for details.

enter image description here

Unfortunately this isn't yet exposed in Shapely. Perhaps opening an issue would motivate this to happen.

1
  • Looks like that would do the trick. Cheers for the heads-up
    – CreekGeek
    Commented Mar 25, 2023 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.