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

geoContains for LineStrings incorrect? #154

Closed
ondras opened this issue Jan 14, 2019 · 2 comments
Closed

geoContains for LineStrings incorrect? #154

ondras opened this issue Jan 14, 2019 · 2 comments

Comments

@ondras
Copy link
Contributor

ondras commented Jan 14, 2019

Somewhat related to #153 -- the implementation of containsLine seems to only check the first two pairs of coordinates in a LineString. A LineString can be much longer, so probably all line segments shall be checked (for the first proximity match).

@mbostock
Copy link
Member

mbostock commented Jan 14, 2019

Yeah, that looks like a bug. Specifically, the current implementation tests whether a single line segment (approximately) contains the specified point, where we should be testing every line segment in the line string.

@Fil
Copy link
Member

Fil commented Jun 21, 2019

Merged, thank you @ondras!

@Fil Fil closed this as completed Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants