如何为每个点几何形状创建1英里的缓冲区并将其投影到地图上?
每当我尝试创建缓冲区时,它都会覆盖整个区域,并看到一个大点。在这里,我试图在位于德克萨斯州特拉维斯县(奥斯汀)
gdf_2017 = gpd.GeoDataFrame(df_2017, geometry=gpd.points_from_xy(df_2017.longitude,
df_2017.latitude))
gdf_2017 = gdf_2017.set_crs("EPSG:6588")
gdf_dem17 = gdf_dem17.set_crs("EPSG:6588")
gdf_2017.geometry=gdf_2017.geometry.buffer(0.1)
fig, ax = plt.subplots(figsize=(12,10))
gdf_dem17.plot(ax=ax)
gdf_2017.plot(ax=ax, color="red")
plt.show()
“ htttps://i.sstatic.net/kb1oc.png”此处
When ever I try to create buffer, it covers the whole area and a big dot is seen. Here, I am trying to make buffer on points which are located in Travis county, Texas (Austin)
gdf_2017 = gpd.GeoDataFrame(df_2017, geometry=gpd.points_from_xy(df_2017.longitude,
df_2017.latitude))
gdf_2017 = gdf_2017.set_crs("EPSG:6588")
gdf_dem17 = gdf_dem17.set_crs("EPSG:6588")
gdf_2017.geometry=gdf_2017.geometry.buffer(0.1)
fig, ax = plt.subplots(figsize=(12,10))
gdf_dem17.plot(ax=ax)
gdf_2017.plot(ax=ax, color="red")
plt.show()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试通过
crs ='epsg:4326'
topoints_from_xy
,然后使用to_crs(“ epsg:6588”)
在您的geodataframe上:然后,由于
EPSG:6588
是一个2D笛卡尔坐标系统( buffer 方法将以米为单位起作用(6588 “ nofollow noreferrer”> https://epsg.io/6588 )。you could try passing
crs='epsg:4326'
topoints_from_xy
and then usingto_crs("EPSG:6588")
on your GeoDataFrame :Then, the
buffer
method will work in meters sinceEPSG:6588
is a 2D cartesian coordinates system (https://epsg.io/6588).实际上,您的CR与缓冲区不同。缓冲区为仪表,但多边形的CRS是学位。将您的多边形几何形状更改为仪表。例如EPSG:32630
Actually, your CRS is not the same as your buffer . buffer is meter but your CRS of your polygons is degree. change your polygon geometry to meter. for example EPSG:32630