How to draw a high resolution etopo background in matplotlib Basemap?

Zipo picture Zipo · Dec 25, 2013 · Viewed 7.7k times · Source

The etopo background pic's resolution is very low in default. How can I get a high resolution background ?

Answer

Temy picture Temy · Jul 31, 2015

I just came into some similar things! At first I thought maybe I should go to GMT. But finally I found this:

http://basemaptutorial.readthedocs.org/en/latest/backgrounds.html

I used the arcgisimage() in Basemap. Once you decide the corresponding epsg number of place of interest, and set the range of plotting, you are likely to get a nice picture. (EPSG number is important.) Here is my code. (POI: LA)

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt

map = Basemap(llcrnrlon=-118.5,llcrnrlat=33.15,urcrnrlon=-117.15,urcrnrlat=34.5, epsg=4269)
#http://server.arcgisonline.com/arcgis/rest/services
#EPSG Number of America is 4269

map.arcgisimage(service='ESRI_Imagery_World_2D', xpixels = 2000, verbose= True)
plt.show()

If you want etopo background, you can just use 'ESRI_Imagery_World_2D', which looks very similar. And from the script you can see the region is less than one degree wide and long.(in lat and lon)

And there are many service to choose from! (I am not advertising.(。・`ω´・) )

Some figure I've drawn. enter image description hereenter image description hereenter image description here