I'm trying to get the individual line segments of a polygon. I want to work with each segment individually, such as get the length, get the vertices etc.
So I have a pandas geodataframe gdf
I can access the polygon through gdf.geometry
The following accesses the polygon as a linestring
for polygon in gdf.geometry:
boundary = polygon.boundary
print(boundary)
Adding .length() gets me the total length.
Any ideas how to split or explode out each line segment?
