【发布时间】:2019-08-15 09:40:36
【问题描述】:
我有一个 geopandas 数据框gdf
gdf
ID longitude latitude geometry
0 80 103.619501 1.2810 POINT (103.619500987 1.281)
1 81 103.619501 1.2855 POINT (103.619500987 1.2855)
在this suggestion 之后,我在它周围创建了一个方形缓冲区,距离bd 定义为:
bd = abs((gdf['latitude'][0]-gdf['latitude'][1])/2)
最后我能够得到以下信息:
buffer = gdf.buffer(bd)
envelope = buffer.envelope
f, ax = plt.subplots(figsize=(7.5, 7.5))
envelope.plot(color='white', edgecolor='gray',ax=ax)
gdf.plot(ax=ax)
如何设置与 500 米对应的距离 bd?
【问题讨论】:
-
stackoverflow.com/questions/57284066/… 这个链接有帮助吗?
标签: python gis geopandas shapely