matplotlib / basemap

Plot on map projections (with coastlines and political boundaries) using matplotlib
MIT License
774 stars 392 forks source link

Basemap topography #204

Open OceanWolf opened 9 years ago

OceanWolf commented 9 years ago

At the moment basemap seems only to support the plain etopo1 map (in data/etopo1.jpg), but other versions exist, i.e. "etopo1 ice surface".

@efiring what do you think about moving this from pycurrents into basemap? It feels like it belongs here next to the standard etopo1, bluemarble, etcetera.

efiring commented 9 years ago

In pycurrents I have a very different sort of support for etopo1, together with a basemap wrapper to facilitate making regional maps with topography. It takes a bit of setup; I use the original etopo files plus two subsampled versions to speed things up for larger areas. These are big files--about 500 MB--so I don't think it makes sense to put them in basemap's data directory as part of the distribution. Probably they would have to be downloaded separately and put in a location to which an environment variable points. In pycurrents I use a relative location and directory naming convention so that they can be located with a simple search, and I don't need to bother with setting an environment variable.

OceanWolf commented 9 years ago

Agreed about the 500Mb file. we can leave it as an error message in the code:

url = 'http://www.matplotlib.org/basemap/...'
try:
  openfile(fname)
except:
  raise Exception('File %s not found, download it from  and put it in this location'
                  % (fname, url))

On the other hand, we could also make the entire thing a basemap extension, i.e. in its own repository called basemap-topography. That would make it easier for linux distros to package, i.e. naming them basemap-topography and basemap-topography-data, they would depending on each-other with basemap offering basemap-topography as a suggested package to install alongside.