-
Notifications
You must be signed in to change notification settings - Fork 949
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
along
should support negative offset
#2148
Comments
Sounds like a nice addition. |
Thanks for raising this as an idea, appreciate the input. Unfortunately I'm not sure this makes sense for one primary reason which is that this seems to work on the assumption that a LineString Feature is straight. For example -1 mile along a non straight line would lead to the question of -1 mile in which direction? As such I am not convinced this should be implemented. I'll leave this open for a bit if someone can describe how this might work. |
I interpreted the use case as - I want the point 1 mile Instead of flipping the order of the Linestring coordinates and using a positive |
@turfjs/along
should allow a negative offset.Example
When you use
along
with1 mile
offset, the point is correctly returned. If I call the function with-1 mile
, an error is thrown.I briefly tried to implement this inside the
along
source without a quick success, so I raise this issue as a reminder and maybe someone else also has a need for this requirement.My current workaround is to flip the original line (swap coordinates) and apply a positive offset.
Version: 6.5.0
The text was updated successfully, but these errors were encountered: