方位等距投影¶
在方位等距投影中,从地图中心到任何其他点的最短路线是一条直线。因此,对于指定点,在此投影中,围绕该点的所有点在地球表面上是等距的。指定的点 lon_0, lat_0
在地图中心显示为一个黑点。
以下是使用 `width` 和 `height` 关键字指定地图区域的示例。
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
width = 28000000; lon_0 = -105; lat_0 = 40
m = Basemap(width=width,height=width,projection='aeqd',
lat_0=lat_0,lon_0=lon_0)
# fill background.
m.drawmapboundary(fill_color='aqua')
# draw coasts and fill continents.
m.drawcoastlines(linewidth=0.5)
m.fillcontinents(color='coral',lake_color='aqua')
# 20 degree graticule.
m.drawparallels(np.arange(-80,81,20))
m.drawmeridians(np.arange(-180,180,20))
# draw a black dot at the center.
xpt, ypt = m(lon_0, lat_0)
m.plot([xpt],[ypt],'ko')
# draw the title.
plt.title('Azimuthal Equidistant Projection')
plt.show()
(源代码
)

如果 `width/height` 和 `corner lat/lon` 关键字都省略,则整个世界将以圆形绘制。
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
lon_0 = -105; lat_0 = 40
m = Basemap(projection='aeqd',lat_0=lat_0,lon_0=lon_0)
# fill background.
m.drawmapboundary(fill_color='aqua')
# draw coasts and fill continents.
m.drawcoastlines(linewidth=0.5)
m.fillcontinents(color='coral',lake_color='aqua')
# 20 degree graticule.
m.drawparallels(np.arange(-80,81,20))
m.drawmeridians(np.arange(-180,180,20))
# draw a black dot at the center.
xpt, ypt = m(lon_0, lat_0)
m.plot([xpt],[ypt],'ko')
# draw the title.
plt.title('Whole World Azimuthal Equidistant Projection')
plt.show()
(源代码
)
