我有一个 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)
根据这个建议,我创建了一个正方形的缓冲区,并且定义了距离为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
?