I have a GeoPandas GeoDataFrame that looks like this:
shape_id geometry
1000252 LINESTRING (4.91790 52.34725, 4.91797 52.34715...
1000254 LINESTRING (4.80382 52.34495, 4.80413 52.34500...
1000255 LINESTRING (4.89922 52.37811, 4.89923 52.37807...
I would like to extract the coordinates in the geometry column for each shape_id
row individually as a list. For example, the output for shape_id
= 1000252
should be as follows:
[[52.34725, 4.91790],
[52.34715, 4.91797],
[52.34742, 4.91723],
[52.34752, 4.91713]]
What is the most efficient way to achieve this?