From: <js...@us...> - 2007-11-07 13:11:21
|
Revision: 4140 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4140&view=rev Author: jswhit Date: 2007-11-07 05:11:15 -0800 (Wed, 07 Nov 2007) Log Message: ----------- add to list of projections that can't cross pole, close Antarctica for all that don't. Modified Paths: -------------- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py Modified: trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py =================================================================== --- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-07 12:56:23 UTC (rev 4139) +++ trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-07 13:11:15 UTC (rev 4140) @@ -754,12 +754,9 @@ hasSP = boundarypolyxy.contains(SPole) containsPole = hasNP or hasSP # these projections cannot cross pole. - if containsPole and self.projection in ['tmerc','cass','omerc','merc']: + if containsPole and\ + self.projection in ['tmerc','cass','omerc','merc','mill','cyl','robin','moll','sinu','geos']: raise ValueError('%s projection cannot cross pole'%(self.projection)) - # make sure geostationary projection has containsPole=False - # even if only a limited area is requested (since entire - # disk will be used to subset boundary geometries). - if self.projection == 'geos': containsPole = False # make sure orthographic projection has containsPole=True # we will compute the intersections in stereographic # coordinates, then transform to orthographic. @@ -795,9 +792,9 @@ # coordinates (this saves time, especially for small map # regions and high-resolution boundary geometries). if not containsPole: - # close Antarctica for projections in which this + # close Antarctica. for projections in which this # is necessary. - if name == 'gshhs' and self.projection in ['cyl','merc','mill','moll','robin','sinu','geos','tmerc','cass','omerc']: + if name == 'gshhs': b = npy.asarray(poly.boundary) lons = b[:,0] lats = b[:,1] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |