- Do you have the Mapping Toolobx? If so, look at shaperead to read the file in.
- What version of Matlab are you running? If it 2015b or beyond, the new graph objects and their related methods (including a few shortest path algorithms) will help.
How can I convert shapefiles to graph
5 views (last 30 days)
Show older comments
I want to convert a .shp file or GIS data for (road network) to graph, so I can calculate the shortest path
Thank you..
0 Comments
Answers (1)
Kelly Kearney
on 29 Apr 2016
A few questions:
The process of converting from shapefile data to graph object will depend on exactly what data is in the shapefiles. Are the road endpoints and intersection points (nodes) already known? Are the lengths of each road segment known? Or are you simply starting with road coordinates, with all this detail (and possibly the connectivity) needing to be calculated?
See Also
Categories
Find more on Map Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!