I am trying to create a small application that will show zoomed in maps. If possible, I would like to avoid using map tiles.
Going off the example on this page: https://scitools.org.uk/cartopy/docs/v0.15/matplotlib/intro.html
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
ax = plt.axes(projection=ccrs.Mollweide())
ax.stock_img()
ax.set_extent([35,45,35,45])
plt.show()
I realize that this is the nature of a bitmap image.
I am just wondering if there is some method I don't know about for showing it in a higher resolution/dpi?
And if not, is there any middle to solution between this and using, say, Open Streetmap tiles?
I think that in order to use a tiled map I would need to run my own server, but I will largely be showing the same few map sections repeatedly, so I would think there must be some way around this.
Best Answer
It looks like
cartopy
package a downsampled version of the Natural Earth 'shaded relief and water' image as the stock image. You could try the original version (available here) and useax.imshow
to load it (following the source forax.stock_img
quite closely).Unfortunately this only gives a little improvement (see below), depending the size of your area of interest.
with extent [35,45,35,45]:
with extent [35,45,36,46]:
Beyond this, I'd either use vector data for background (Natural Earth have political, physical and cultural vector data), look for a bigger tif, or go with the tiled approach. Stamen terrain might be suitable, as in this cartopy example (or older version). Hope that's helpful!