How can I convert shapefiles to graph

4 visualizaciones (últimos 30 días)
Meshaiel M
Meshaiel M el 29 de Abr. de 2016
Comentada: Meshaiel M el 30 de Abr. de 2016
I want to convert a .shp file or GIS data for (road network) to graph, so I can calculate the shortest path
Thank you..

Respuestas (1)

Kelly Kearney
Kelly Kearney el 29 de Abr. de 2016
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 comentario
Meshaiel M
Meshaiel M el 30 de Abr. de 2016
yes I have Mapping Toolobx and I use shaperead to read the file to Geometry X Y type of data is struc
I have R2016a version

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by