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

Add precise version of isPointInLine #237

Open
groupsky opened this issue Jul 15, 2020 · 0 comments
Open

Add precise version of isPointInLine #237

groupsky opened this issue Jul 15, 2020 · 0 comments
Assignees

Comments

@groupsky
Copy link

groupsky commented Jul 15, 2020

When processing some data I stumbled on the difference in the two distance calculation methods.

isPointInLine(
  { latitude: 41.61884689, longitude: 24.66986465 },
  { latitude: 41.6166666286222, longitude: 24.5994927167 },
  { latitude: 41.6191097253556, longitude: 24.7194241952577}
)

Returns true, but if using the getPriceDistance for calculating the distance to the line it results in around 100m.

A sample geojson also shows the point is outside of the poly and not on the line.

For situations like this would be good to have the ability to provide the distancing function to isPointInLine similar how it's done for getPathLength.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants