peterstace / simplefeatures

Simple Features is a pure Go Implementation of the OpenGIS Simple Feature Access Specification
MIT License
125 stars 19 forks source link

Hack: swap line vs. line intersection order #575

Closed peterstace closed 8 months ago

peterstace commented 8 months ago

Description

This fixes a bug where anomalously close DCEL nodes cause DCEL extraction to fail. The bug would occur because the line vs. line intersection operation was not symmetric, and was called from "both directions" when re-noding input geometries.

This solution is a bit of a hack. Instead, a longer term solution is to truly make the operation symmetric (e.g. by implementing a more numerically stable algorithm).

Check List

Have you:

Related Issue

Benchmark Results

TODO

peterstace commented 8 months ago

Thanks for reviewing Albert! I'm going to have a crack at a better solution for this a bit later (i.e. to go into the next release).