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

navigation information #22

Open
bertrandmd opened this issue Oct 6, 2017 · 6 comments
Open

navigation information #22

bertrandmd opened this issue Oct 6, 2017 · 6 comments

Comments

@bertrandmd
Copy link

Hi @perliedman !
Do you have any idea if it's possible to create/extract navigation data from a geojson ?
It could be amazing to add this to geojson-path-finder response !
thanks for your work!!

@perliedman
Copy link
Owner

Hi! Could you elaborate on what you mean by "navigation data"?

In general, GeoJSON is such a general format that it's hard to make any assumptions on what data you can extract, except for the actual geometry.

@bertrandmd
Copy link
Author

Hi,
I am referring to the guidance instructions as they are used in Leaflet Routing Machine
(go straight XX meters, turn right, ...)
I don't know if it's possible to create this from geographical topology.

@perliedman
Copy link
Owner

Ok, I see. I think it's outside the scope of this project, but I can see the need.

What I think would need to be done in GeoJSON Path Finder is to break down the path into segments (compared to the array of coordinates we use now), that could then be turned into instructions.

I'm happy to answer questions to help out if this is something you or someone else would be willing to take on, but since I don't have this use case at the moment, I don't think it's something I will take on myself at this point.

@bertrandmd
Copy link
Author

I could be interested by doing this, do you have some tricks for transforming segments in instructions ?
Thanks

@perliedman
Copy link
Owner

If the route is turned into segments (by "segment", I mean that the route is split on each node it passes, to make it clear where turns are made, etc.), I think you could figure out turn angles etc., which you could use to produce things like "turn left", etc.

For better instructions, you would have to map street names or things like that to properties of the GeoJSON.

@ValarMorghulis12138
Copy link

This is exactly what I have done in my project 😂. It's not perfect, but quite enouth for current customer need. AND now it's year 2022, really grateful for your amazing library "geojson-path-finder" and "leaflet-routing-machine". Men, you are the best!

If the route is turned into segments (by "segment", I mean that the route is split on each node it passes, to make it clear where turns are made, etc.), I think you could figure out turn angles etc., which you could use to produce things like "turn left", etc.

For better instructions, you would have to map street names or things like that to properties of the GeoJSON.

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

3 participants