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

Routing to or from multipolygon, not only point->point #2857

Open
igor-suhorukov opened this issue Aug 4, 2023 · 7 comments
Open

Routing to or from multipolygon, not only point->point #2857

igor-suhorukov opened this issue Aug 4, 2023 · 7 comments

Comments

@igor-suhorukov
Copy link

Describe the bug
Current implementation of graphhopper-core support only point to point routing. But sometimes user attempt request shortest route to some place like park, beach or protected area. In this case route will be to centre not to one from the N entrance to this area.

To Reproduce

Any existing versions of GraphHopper

Expected behavior
GraphHopper accept multipolygon/polygon on input and calculate intersections with all roads/paths, after that calculate all routes and find best one from M routes

@easbar
Copy link
Member

easbar commented Aug 4, 2023

Can you provide a real example where this would be useful?

@igor-suhorukov
Copy link
Author

igor-suhorukov commented Aug 4, 2023

@easbar Sure. As an example I am planning for vacation and want calculate distance from house to the beach "Playa de Torviscas" in GraphHopper.
In case Point->Point routing I should write program on some programming language to find all roads/path intersections with beach, calculate routes in loop and find best result from M routes.

The same story with route from house to Kensington Gardens
The house can also be located on some territory with several exits / gates or the building has many entrances ...

@easbar
Copy link
Member

easbar commented Aug 4, 2023

Ok, thanks. There would be two problems to be solved here then:

One is routing from a point to one of multiple locations, or more generally routing between two sets of points and finding the ideal start/destination points. This can be done with a single search, without calculating all the single routes. It would also be useful to calculate the route to the nearest of multiple train stations for example.

The other is finding the 'entrance points' of an area-like feature like the beach/garden you mentioned.

@igor-suhorukov
Copy link
Author

The other is finding the 'entrance points' of an area-like feature like the beach/garden you mentioned.
@easbar much more easy find all multipolygon intersections with all 'highway'/'paths'/'footpath' as roads graph already in GraphHopper

@karussell
Copy link
Member

It would also be useful to calculate the route to the nearest of multiple train stations for example.

There was even something like this in the repo a long time ago :)

@igor-suhorukov
Copy link
Author

@karussell do you remember, why it was removed?

@karussell
Copy link
Member

Too specialized and never really used.

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