#284 Different types of map projection

The earth being a sphere, it has always been tricky to represent it in 2 dimensions. Several projections exist, all with pro and con, and a few of them are implemented in matplotlib. Pick the one you need!

  • 
    # ortho
    m=Basemap(lat_0=0, lon_0=0, projection='ortho' )
    m.drawmapboundary(fill_color='#A6CAE0')
    m.fillcontinents(color='grey', alpha=0.3)
    
    
  • 
    # merc
    m=Basemap(llcrnrlon=-180, llcrnrlat=-60,urcrnrlon=180,urcrnrlat=80, projection='merc')
    m.drawmapboundary(fill_color='#A6CAE0')
    m.fillcontinents(color='grey', alpha=0.3)
    
    
  • 
    # robin
    m=Basemap(lat_0=0, lon_0=0, projection='robin' )
    m.drawmapboundary(fill_color='#A6CAE0')
    m.fillcontinents(color='grey', alpha=0.3)
    
    
  • 
    #aeqd --> you HAVE to provide lon_0 and lat_0
    m=Basemap(lat_0=30, lon_0=30, projection='aeqd' )
    m.drawmapboundary(fill_color='#A6CAE0')
    m.fillcontinents(color='grey', alpha=0.3)
    
    
  • 
    #nsper
    m=Basemap(lat_0=0, lon_0=0, projection='nsper' )
    m.drawmapboundary(fill_color='#A6CAE0')
    m.fillcontinents(color='grey', alpha=0.3)
    
    
  • 
    #cyl
    m=Basemap(llcrnrlon=-180, llcrnrlat=-60,urcrnrlon=180,urcrnrlat=80, projection='cyl' )
    m.drawmapboundary(fill_color='#A6CAE0')
    m.fillcontinents(color='grey', alpha=0.3)
    
    

 

Leave a Reply

Your email address will not be published.