Changeset 7577 for qesdi


Ignore:
Timestamp:
08/10/10 14:22:04 (9 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.

Location:
qesdi/geoplot/trunk
Files:
5 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): 
  • qesdi/geoplot/trunk/lib/geoplot/map_national_grid.py

    r5710 r7577  
    3434 
    3535def addBasemap(resolution): 
     36    
     37    # Create a basemap with the origin at the true origin. 
     38    # In order to cope with different Basemap versions you may need to 
     39    # Define the rsphere argument as the major and minor axis (of the sphere) 
     40    # - documented at: 
     41    #  http://proj.badc.rl.ac.uk/ndg/wiki/CowsFramework/CowsInstallation/MigrationToPython2.6?version=9#BasemapproblemwithTransverseMercatorprojection 
     42    rsphere = [6378137.00, 6356752.3142] 
     43 
    3644     
    3745    llBasemaps[resolution] = \ 
     
    4452                    urcrnrlat=bmyLimits[1], 
    4553                    resolution=resolution, 
     54                    rsphere = rsphere, 
    4655                    suppress_ticks=False) 
    4756         
  • qesdi/geoplot/trunk/lib/geoplot/tests/create_lat_lon_grid_var.py

    r5710 r7577  
    99falseOrigin = (-400000, 100000) 
    1010trueOrigin = (358.0, 49.0) 
     11rsphere = [6378137.00, 6356752.3142] 
    1112 
    1213bm_national = Basemap(projection='tmerc', 
     
    1819                 urcrnrlat=60.0, 
    1920                 resolution='c', 
     21                 rsphere = rsphere, 
    2022                 suppress_ticks=False) 
    2123 
  • qesdi/geoplot/trunk/lib/geoplot/tests/create_national_grid_var.py

    r5403 r7577  
    1111falseOrigin = (-400000, 100000) 
    1212trueOrigin = (358.0, 49.0) 
     13rsphere = [6378137.00, 6356752.3142] 
    1314 
    1415bm_national = Basemap(projection='tmerc', 
     
    2021                 urcrnrlat=64.0, 
    2122                 resolution='c', 
     23                 rsphere = rsphere, 
    2224                 suppress_ticks=False) 
    2325 
  • qesdi/geoplot/trunk/setup.py

    r6540 r7577  
    33setup( 
    44    name='geoplot', 
    5     version='0.3.3', 
     5    version='0.4.0', 
    66 
    77    # All packages are located in the lib directory 
Note: See TracChangeset for help on using the changeset viewer.