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

Compute multiFeatureLocation in addition to location property in @turf/nearest-point-on-line #2867

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

EmilJunker
Copy link
Contributor

This adds a multiFeatureLocation property to the points returned by the nearestPointOnLine function. If there is just one LineString, then this will be the same as the existing location property. But if you pass a MultiLineString, this will tell you the distance along the line between the start of the MultiLineString where the closest point was found and the closest point itself. See #2753 for an example why this is useful.

Closes #2753.

Please provide the following when creating a PR:

  • Meaningful title, including the name of the package being modified.
  • Summary of the changes.
  • Heads up if this is a breaking change.
  • Any issues this resolves.
  • Confirmation you've read the steps for preparing a pull request.

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.

nearestPointOnLine unexpectedly sums up lengths of multiLineStrings for location property
1 participant