How can I convert shapefiles to graph
Afficher commentaires plus anciens
I want to convert a .shp file or GIS data for (road network) to graph, so I can calculate the shortest path
Thank you..
Réponses (1)
Kelly Kearney
le 29 Avr 2016
0 votes
A few questions:
- 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.
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?
1 commentaire
Meshaiel M
le 30 Avr 2016
Catégories
En savoir plus sur Map Display dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!