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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With