Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenMapTiles. vehicle routing

I am trying to use openMapTiles vector tiles for vehicle routing. It seems like a very fast data source to load. I intend to simulate many vehicles, so repeatedly querying google maps api is not an option.

Is there an easy way to find road intersections? Are bridges a special case?

Also I will eventually need to merge multiple tiles together. How is that done in practice? Do the points along the edges line up with adjacent tiles. What if there is 4-way intersection near a tile boundary?

like image 353
dooderson Avatar asked Aug 31 '18 22:08

dooderson


1 Answers

Vector tiles are not optimized for routing. While it might be possible to do very basic routing (better call it pathfinding) on vector-tiles, this is very limited and I am not aware of any project that does this, so you might have to write your own library (which I don't recommend).

Vector tiles usually don't contain routing information, so there is no maxspeed, or access rules. In addition to that, how would you handle a case, where the fastest route leads over a road that is a) not yet available on your current zoom level or b) outside your currently loaded tiles.

AFAIK Brouter and Valhalla use a tile approach for routing, but they use special tiles that cover a large area (like a country) and that are specially generated for the purpose of routing.

I recommend to use a routing api, there is for example GraphHopper or as mentioned by isp-zax there is Mapbox.

like image 153
Robin Avatar answered Oct 31 '22 13:10

Robin