Acquiring Connectivity of Points from Shape File

6 views (last 30 days)
czeslaw
czeslaw on 20 May 2018
Answered: KSSV on 21 May 2018
Hi All,
I have this shape file that contains: Lat, Lon, Geometry, BegMP, EndMP, RouteNumber... Using the Lat Lon, I can plot the points as below:
However, I cannot acquire the information related to the line path that connect the neighboring points. The Geometry contains a set of string written as "Line". I suspect there is a way to get the connectivity since I can view the line or in arcgis. The arcgis see these as polyline.
Please suggestions. Thank you.

Answers (1)

KSSV
KSSV on 21 May 2018
As it is a shape file..I guess already you have the connectivity in hand. You see the below code..I am plotting data of shape file into lines with different colors for each line.
figure
hold on
S = shaperead('concord_roads.shp') ;
for i = 1:length(S)
plot(S(i).X,S(i).Y,'color',rand(1,3)) ;
end
The same, should be applicable for you.

Community Treasure Hunt

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

Start Hunting!