【发布时间】:2021-11-08 21:18:41
【问题描述】:
如何在 Geopandas 数据框中获取 POLYGON 中的坐标值?
shapefile = gpd.read_file("CAMPOS_PRODUCAO_SIRGASPolygon.shp")
我可以很容易地为我的 POLYGON 的质心做到这一点
用它:
print(campos_shape.centroid.iloc[0].x)
-39.853276865819765
print(type(campos_shape.centroid.iloc[0].x))
<class 'float'>
我想要一个列表或 numpy 数组,其所有点值为 lat 和 lon 包含在 POLYGON 中
那么如何将 POLYGON 转换为 numpy 数组?
【问题讨论】: