Hello,

I'm new to this list (but not matplotlib and basemap), and am not sure if
this is the place to post basemap questions.  I apologise if I have erred.

I'm reporting an issue whereby if I try to plot a zoomed in orthographic
projection with a bluemarble (or etopo or shaded relief) background, the
background remains "global," though it's oriented to the correct location,
not mapping to the zoomed projection coordinates.  I am pasting in a simple
demo code that illustrates the behaviour.  If you use the lcc projection,
all works fine, and if you use a "non-zoomed" ortho projection, the
background maps correctly.

It seems that there is something preventing the background from mapping
into anything but a "complete-domain" ortho projection.  I'm not a great
map person, and I realise I may be missing the boat on the way I'm trying
to zoom my ortho projection, but I'm not sure.

Am I screwing up, or is it a bug?

Thank you,

Don Morton

#---------------------------------------------------

import mpl_toolkits.basemap as bm
import matplotlib.pyplot as plt
import numpy as np

# Define a lambert conformal over northwest United States
# With this projection (centered on Montana, and zoomed in),
# the background image does map to the zoomed in projection
'''
theMap = bm.Basemap(projection='lcc',
                    lat_0=47, lat_1=30, lat_2=60, lon_0=-115,
                    llcrnrlat=43, llcrnrlon=-128,
                    urcrnrlat=55, urcrnrlon=-105,
                    resolution='i', area_thresh=1000)
'''

# With this projection (centered on Vienna, and zoomed in),
# the background image doesn't map to the zoomed in projection
theMap = bm.Basemap(projection='ortho',
                    lat_0=48.2, lon_0=16.4,
                    llcrnry=-1000000.0, llcrnrx=-1000000.0,
                    urcrnry=1000000.0, urcrnrx=1000000.0,
                    resolution='l', area_thresh=1000)

theMap.drawcountries()
theMap.drawcoastlines()
theMap.bluemarble()
#theMap.shadedrelief()
#theMap.etopo()

plt.show()


---
Don Morton, Owner/Manager
Boreal Scientific Computing LLC
Fairbanks, Alaska USA
http://www.borealscicomp.com/
http://www.borealscicomp.com/Miscellaneous/MortonBio/
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to