How to convert a graph / edges list into a shapefile (.shp) ?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Here an example of graph "G", built up with Matlab:
s = [1 1 2 2 2 3 3 3];
t = [2 3 3 4 5 6 7 5];
x = [0 0 1 0 4 3 1];
y = [0 1 0 4 5 0 -1];
G = graph(s,t);
G.Nodes.X = x'; G.Nodes.Y = y';
plot(G,'XData',G.Nodes.X,'YData',G.Nodes.Y)
0 Kommentare
Antworten (2)
Christine Tobler
am 6 Jul. 2022
There isn't a direct way to do this with a graph object. The mapping toolbox has a shapewrite function which produces a .shp file, but it will first require putting these vectors into one of its data structures (geolineshape or maplineshape might be the right ones for your case).
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


