0

I'm not sure if there is an answer for this so any alternative suggestions are appreciated. I'm aiming to account for more island land mass when plotting a baseman with contextily. I'm using matplotlib/contextily instead of Plotly because a scale bar is required.

Using below, the screenshot from google display multiple islands that aren't included in the contextily basemap.

fig, ax = plt.subplots(figsize = (10,10))
ax.grid(False)
ax.set_xlim(151, 153)
ax.set_ylim(-24, -23)

A = [-74.5 * np.pi/180.,40.7 * np.pi / 180.] # Latitude of interest here 40.7 deg, longitude -74.5
B = [-73.5 * np.pi/180.,40.7 * np.pi / 180.] # Latitude of interest here 40.7 deg, longitude -74.5 + 1
dx = (6371000) * haversine_distances([A, B])[0,1]
ax.add_artist(ScaleBar(dx = dx, units = 'm')) 

cx.add_basemap(ax, crs = 'EPSG:4326')

output:

enter image description here

google output:

enter image description here

Chopin
  • 96
  • 1
  • 10
  • 35

0 Answers0