I want to measure the distance between two points in a road network like this: enter image description here

I have the road WKT and also the points WKT. I know that I can measure this using QGIS (road graph plugin) or PyQGIS, but is there anyway to do this efficiently using shapely or GDAL or NetworkX? I've tried to use the shapely.distance function, but it seems the function measures the shortest distance based on euclidean and not following the road network.

Does anyone have some suggestions?

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.