Closed urschrei closed 9 months ago
@urschrei Is this ready for review?
Nope: it turns out that JTS and GEOS have different interpretations of the input epsilon
: JTS uses epsilon ^ 2
for the VW algorithm, and GEOS uses epsilon
. We currently use epsilon
, but as @michaelkirk pointed out, GEOS is downstream of JTS and there was discussion of whether to bring our implementation in line with JTS (and also why GEOS made that decision, which also affects Shapely and PostGIS) or stick with what we have. Discussion has stalled, so I guess we can revisit next week and make a decision, at which point this'll be reviewable.
This is ready for review if anyone's feeling inclined!
[ ] I added an entry to
CHANGES.md
if knowledge of this change could be valuable to users.This is a refactor of both VW and VwPreserve, partially in response to #1049:
geo
continuing
with a fresh triangle if a triangle area above epsilon is popped from the min-heap we simplybreak
now: there's no need to check any more triangles, since the min-heap ensures that all remaining elements are above epsilon