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

LineStringSegmentize returning n - 1 linestrings at small distances #1106

Closed
wants to merge 3 commits into from

Conversation

JosiahParry
Copy link
Contributor

  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

Floating point strikes again.

When line segmentizing very small distances n - 1 linestrings are returned. This is, of course, due to floating point precision. The solution is to reduce the distance between densified points by f64::EPSILON.

Fixes ropensci/stplanr#552 and JosiahParry/rsgeo#34

@JosiahParry JosiahParry changed the title f: n - 1 linestrings at small distances LineStringSegmentize returning n - 1 linestrings at small distances Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Argument of segment_length in line_segment fun causes issue
1 participant