Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linestring splitting issues #62

Merged
merged 4 commits into from
May 24, 2024
Merged

Fix linestring splitting issues #62

merged 4 commits into from
May 24, 2024

Commits on May 24, 2024

  1. Test for pN and pE length consistently when splitting line

    The specific case added as a test was triggering the condition where
    pE != pN but pE.length() == pN.length()
    and falling through to the "Unexpected points..." error. If we consistently
    check lengths through all of these cases, this is fixed.
    tomalrussell committed May 24, 2024
    Configuration menu
    Copy the full SHA
    becbb5c View commit details
    Browse the repository at this point in the history
  2. Use std::hypot for 2D length calculation

    Should be more robust to numerical edge cases (0/inf/nan) and
    under/overflow.
    tomalrussell committed May 24, 2024
    Configuration menu
    Copy the full SHA
    a5aebfe View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d30e186 View commit details
    Browse the repository at this point in the history
  4. Use cell size as a reference value in "almost-equals" comparison

    Issue 53 was failing with an unreasonably precise comparison
    of values (point, gridline) near zero. Fixed by including the grid
    cell size as part of the calculation of a reasonably scaled epsilon,
    in general the utility almost_equals now also takes an argument
    for an indicative order-of-magnitude reference value.
    tomalrussell committed May 24, 2024
    Configuration menu
    Copy the full SHA
    fd501cb View commit details
    Browse the repository at this point in the history