Ignore:
Timestamp:
08/10/10 14:22:04 (10 years ago)
Author:
astephen
Message:

Committed changes to be compatible with Matplotlib and Basemap versions
1.0.0. Note that these changes "should" be backwards compatible.
Egg created from this version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qesdi/geoplot/trunk/lib/geoplot/grid_builder_national.py

    r5826 r7577  
    3030 
    3131# Create a basemap with the origin at the true origin. 
    32 nationalGrid = basemap.Basemap(projection='tmerc', 
    33                                lon_0=trueOrigin[0], 
    34                                lat_0=trueOrigin[1], 
    35                                llcrnrlon=trueOrigin[0], llcrnrlat=trueOrigin[1], 
    36                                urcrnrlon=10, urcrnrlat=10, 
    37                                resolution=None) 
     32# In order to cope with different Basemap versions you may need to  
     33# Define the rsphere argument as the major and minor axis (of the sphere) 
     34# - documented at: 
     35#  http://proj.badc.rl.ac.uk/ndg/wiki/CowsFramework/CowsInstallation/MigrationToPython2.6?version=9#BasemapproblemwithTransverseMercatorprojection 
     36rsphere = [6378137.00, 6356752.3142] 
     37 
     38nationalGrid = basemap.Basemap(projection = 'tmerc', 
     39                               lon_0 = trueOrigin[0], 
     40                               lat_0 = trueOrigin[1], 
     41                               llcrnrlon = trueOrigin[0], llcrnrlat = trueOrigin[1], 
     42                               urcrnrlon = 10, urcrnrlat = 10, 
     43                               rsphere = rsphere, 
     44                               resolution = None) 
     45 
     46 
    3847 
    3948class GridBuilderNational(GridBuilderBase): 
Note: See TracChangeset for help on using the changeset viewer.