小编Sin*_*mer的帖子

Change background map for contextily

I have this code:

import pandas as pd
import numpy as np
from geopandas import GeoDataFrame
import geopandas
from shapely.geometry import LineString, Point
import matplotlib.pyplot as plt
import contextily

''' Do Something'''

df = start_stop_df.drop('track', axis=1)
crs = {'init': 'epsg:4326'}
gdf = GeoDataFrame(df, crs=crs, geometry=geometry)

ax = gdf.plot()
contextily.add_basemap(ax)
ax.set_axis_off()
plt.show()
Run Code Online (Sandbox Code Playgroud)

Basically, this generates a background map that is in Singapore. However, when I run it, I get the following error: HTTPError: Tile URL resulted in a 404 error. Double-check …

python python-3.x geopandas contextily

6
推荐指数
2
解决办法
748
查看次数

标签 统计

contextily ×1

geopandas ×1

python ×1

python-3.x ×1