Basemap学习-地图投影管理(02)

Basemap学习-地图投影管理(02)


所有的地图都必须有投影。在Basemap创建之时,它所有的投影和特征就已经
被分配。这种方式与其他的库有截然的不同(比如GDAL),因此,能够理解到
这一点,对处理Basemap至关重要。

投影


  • 投影参数集在地图投影中的使用

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt


map = Basemap(projection='cyl')

map.drawmapboundary(fill_color='aqua')
map.fillcontinents(color='coral', lake_color='aqua')
map.drawcoastlines()

plt.show()
plt.savefig()


投影简写-全称对照

cyl              Cylindrical Equidistant                 
 merc             Mercator                                
 tmerc            Transverse Mercator                     
 omerc            Oblique Mercator                        
 mill             Miller Cylindrical                      
 gall             Gall Stereographic Cylindrical          
 cea              Cylindrical Equal Area                  
 lcc              Lambert Conformal                       
 laea             Lambert Azimuthal Equal Area            
 nplaea           North-Polar Lambert Azimuthal           
 splaea           South-Polar Lambert Azimuthal           
 eqdc             Equidistant Conic                       
 aeqd             Azimuthal Equidistant                   
 npaeqd           North-Polar Azimuthal Equidistant       
 spaeqd           South-Polar Azimuthal Equidistant       
 aea              Albers Equal Area                       
 stere            Stereographic                           
 npstere          North-Polar Stereographic               
 spstere          South-Polar Stereographic               
 cass             Cassini-Soldner                         
 poly             Polyconic                               
 ortho            Orthographic                            
 geos             Geostationary                           
 nsper            Near-Sided Perspective                  
 sinu             Sinusoidal                              
 moll             Mollweide                               
 hammer           Hammer                                  
 robin            Robinson                                
 kav7             Kavrayskiy VII                          
 eck4             Eckert IV                               
 vandg            van der Grinten                         
 mbtfpq           McBryde-Thomas Flat-Polar Quartic       
 gnom             Gnomonic                                
 rotpole          Rotated Pole  

  • 许多投影需要额外的参数

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt


map = Basemap(projection='aeqd', lon_0=10, lat_0=50)

map.drawmapboundary(fill_color='aqua')
map.fillcontinents(color='coral', lake_color='aqua')
map.drawcoastlines()

plt.show()
plt.savefig('momo2.png')


  • 该图是以东经10°,北纬50°为中心的等距投影,覆盖欧洲。一些投影需要更多的参数,具体描述详见http://matplotlib.org/basemap/users/mapsetup.html

你可能感兴趣的:(python可视化)