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

FR: Export distanceToSegment from @turf/point-to-line-distance #2734

Open
mryellow opened this issue Oct 22, 2024 · 2 comments
Open

FR: Export distanceToSegment from @turf/point-to-line-distance #2734

mryellow opened this issue Oct 22, 2024 · 2 comments

Comments

@mryellow
Copy link

distanceToSegment is not exported from @turf/point-to-line-distance.

This function can be handy for walking along a line determining distances, while also determining which segments points are nearest.

@smallsaucepan
Copy link
Member

Hi @mryellow. Would using segmentEach with pointToLineDistance meet your needs?

@mryellow
Copy link
Author

Ended up stepping through with segmentEach and nearestPointOnLine like the geodesic code-path in @turf/point-to-line-distance.

Still, someone else might like that planar method within distanceToSegment.

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

No branches or pull requests

2 participants