Jam*_*ash 5 python geojson shapely geopandas
我在 GeoPandas 数据框中有一列,其中包含类似 this one'{type=Point, coordinates=[37.55, 55.71]}'或 this 的字符串'{type=MultiPoint, coordinates=[[37.6, 55.4]]}'。它也可以是多边形或任何其他几何形状。然后就是嵌套列表形式的几个点。如何将其转换为普通的 GeoPandas 几何对象?
'{type=Point, coordinates=[37.55, 55.71]}'
'{type=MultiPoint, coordinates=[[37.6, 55.4]]}'
mar*_*eis 5
用于shapely.geometry.shape将 geojson 字符串转换为形状几何。
shapely.geometry.shape
from shapely.geometry import shape df['geometry'] = df.apply(lambda: row: shape(row['jsoncolumn']), axis=1)
归档时间:
5 年,7 月 前
查看次数:
6274 次
最近记录:
3 年,9 月 前