我有一个带有lat/long的单个地址的数据帧,我将其转换为GeoPandas数据帧。我将投影设置为上下文EPSG:3857投影
df = gpd.GeoDataFrame(df_vf, geometry=gpd.points_from_xy(df_vf.longitude,df_vf.latitude), crs='EPSG:3857')
df
file_state geometry
4588464 GA POINT (-84.20550 33.96780)
4668958 GA POINT (-81.21680 32.29210)
6530022 GA POINT (-84.98100 34.88710)
1936043 GA POINT (-84.42160 34.03330)
5649637 GA POINT (-83.83120 32.62850)
所有这些人都在乔治亚州,所以我认为这些观点是正确的。我用df.crs
确认EPSG是3857。我正在尝试使用以下方法在一个上下文绘图上绘制点:
ax = df.plot(figsize=(10,10), alpha=0.5, edgecolor='k')
cx.add_basemap(ax, crs=df.crs.to_string(), zoom = 10)
Here is the resulting blank plot
我试图听从其他有类似问题的人的建议:Github issue,Stack Overflow issue通过更改源和缩放级别,但这并没有解决问题
几何图形的CRS不是3857,而是4326。坐标以度为单位
相关问题 更多 >
编程相关推荐