-
Notifications
You must be signed in to change notification settings - Fork 5
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
line_segmentize()
returning incorrect result
#42
Comments
Essentially the same as #34, but this is projected data and with a decent distance between them. Could it be because one of the values in the coords is an integer I wonder... |
robinlovelace-ate
added a commit
to acteng/network-join-demos
that referenced
this issue
Apr 23, 2024
Robinlovelace
added a commit
to ropensci/stplanr
that referenced
this issue
Apr 23, 2024
See JosiahParry/rsgeo#42 which this mitigates
Repro: #[test]
fn robin_test() {
let linestring: LineString = vec![
[418938.4, 434303.2],
[418949.7, 434280.1],
[418961.0, 434257.0],
]
.into();
let segments = linestring.line_segmentize(6).unwrap();
assert_eq!(6, segments.0.len());
} |
Where does the underlying Rust code live? Must be some Rustaceans who will have good ideas on a fix. |
Relevant code, from Josiah: https://github.com/georust/geo/blob/main/geo/src/algorithm/linestring_segment.rs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
line_segmentize()
should always return n linestrings if it's going to work as expected in other functions. In this casen = 6
but the object returned has a length of 5:Created on 2024-04-23 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: