1

I need to create distance matrix between cities in a country in Python. First step I did was to download nodes with place=city|town|village from OpenStreetMap, then I was able to download street network with desired level (highways, first class ...), so I am able to route between any street-network nodes.

Problem is that place nodes are not part of street network - they are not connected - I can only search for closest street node. But the bigger problem is how to determinate what are the city's neighbors. I don't need to know distance from every city to every city, but only direct connection between them.

Is there some way to filter the simplified network directly? For example through overpass API?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.