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

Routes on Ocean #44

Open
vladejs opened this issue Mar 13, 2017 · 5 comments
Open

Routes on Ocean #44

vladejs opened this issue Mar 13, 2017 · 5 comments

Comments

@vladejs
Copy link

vladejs commented Mar 13, 2017

Is there a way to calculate route for ships? I mean, given two points on map, calculate shortest (not mandatory) path without touching ground.

@Starefossen
Copy link
Contributor

Yes, absolutely, but you need to find/make a router backend in order for this to work. I suggest you take a look at https://github.com/pgRouting/pgrouting.

@vladejs
Copy link
Author

vladejs commented Mar 14, 2017

So, is not possible by only using Leaflet to detect ground between two points? Maybe by calculating intercepting geometries on the path?

I don't care about route restrictions, what I only need to know is if there is a way using Leaflet to draw a path between 2 points without touching Ground. Doesn't matter if the calculated path is conceptually wrong for a ship travel, I just need to solve the problem: "Given two points on sea, draw a path wich doesn't touch ground"

@Starefossen
Copy link
Contributor

No, Leaflet itself does not know what is land and what is water on the map. It only knows about coordinates and how to display items within the grid.

@vladejs
Copy link
Author

vladejs commented Mar 14, 2017

But, is it possible somehow to know given a polygon (a straight line for example, or a triangle), if it has intercepting features?

For example, I could detect geometries that intercepts the line, get their bounds, and re-draw the line so it pass through those bounds.

Is that doable with Leaflet? Thanx in advance.

@miromel
Copy link

miromel commented Aug 4, 2019

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