The etopo background pic's resolution is very low in default. How can I get a high resolution background ?
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.(。・`ω´・) )
With the function warpimage()
you can use any custom image as a map background. The image must be global, covering the world in lat/lon coordinates from the international dateline eastward and the South Pole northward.
You can use the .etopo() method directly.
© 2022 - 2024 — McMap. All rights reserved.