使用 pyproj 可视化开放的街道地图并得到以下错误:
> AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyproj\crs.py:77:
> FutureWarning: '+init=<authority>:<code>' syntax is deprecated.
> '<authority>:<code>' is the preferred initialization method. return
> _prepare_from_string(" ".join(pjargs))
程序运行但吐出一张空白的地图。
我在谷歌上找不到太多东西。这是什么以及如何解决它?
请参阅下面的代码片段:
##Create map
crs = {'init': 'epsg:4326'}
new_df = gpd.GeoDataFrame(new_df, crs=crs)
#Contextly
new_df = new_df.to_crs(epsg=3857)
##Plot
variable = 'All' #set a variable that will call column
fig, ax = plt.subplots(1, figsize=(50, 50)) #create figure and axes for Matplotlib
ox = new_df.plot(column=variable, cmap='viridis', linewidth=0.3, ax=ax, edgecolor='0.8',alpha=0.5,scheme='equal_interval',k=10,legend=True,legend_kwds={'loc': 'lower left'})
##ADD BASEMAP
ctx.add_basemap(ox,zoom=15)
#Remove the axis
ox.set_axis_off()
##Save Map
plt.savefig('Latest_Map.png')
##Show Map
plt.show()