如何在立体投影上更改极点的位置

时间:2019-05-27 12:58:33

标签: python maps map-projections

cartopy.crs.Stereographic的中心是北极 显而易见的原因,但是我将如何将其转移到 我选择的经度/纬度,以便盒子趋向于 那个位置而不是北极?

fig=plt.figure(figsize=(60, 28))

projection = ccrs.RotatedPole(pole_longitude=11.5, pole_latitude=79.5)

ax = plt.axes(projection=ccrs.Stereographic(central_latitude=79.0, central_longitude=11.5))
ax.set_extent([-180, 180, 30, 90], crs=ccrs.PlateCarree())
ax.coastlines()
ax.pcolormesh(lons, lats, result_array, transform=ccrs.PlateCarree())

Centre the pole from lat=90 to lat=79, long=11.5

fig=plt.figure(figsize=(60, 28))

import matplotlib.pyplot as plt
import cartopy.crs as ccrs

lons = np.arange(-180, 180, 1)
lats = np.arange(0, 90, 1)

# create the projections
ortho = ccrs.Orthographic(central_longitude=11, central_latitude=79)
geo = ccrs.Geodetic()

# create the geoaxes for an orthographic projection
ax = plt.axes(projection=ortho)

# plot north pole for reference (with a projection transform)                                                                                           
ax.plot([0], [90], 'b^', transform=geo)

ax.pcolormesh(lons, lats, result_array, transform=ccrs.PlateCarree())

# add coastlines for reference                                                                                                
ax.coastlines(resolution='50m')
ax.set_global()

enter image description here

0 个答案:

没有答案