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

3

5

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

Pristine answered 25/12, 2013 at 3:29 Comment(0)
I
12

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

Inhere answered 31/7, 2015 at 0:28 Comment(0)
E
1

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.

Endorsee answered 25/12, 2013 at 20:36 Comment(0)
C
1

You can use the .etopo() method directly.

Chimene answered 1/4, 2015 at 17:24 Comment(1)
This is a helpful answer, but here is the link to the description of using the etopo() method. It can be used for a resolution up to one minute of lat/lon (1/60 of a degree)Cluck

© 2022 - 2024 — McMap. All rights reserved.