mikezang
mikezang

Reputation: 2499

Why does Orthographic map projection display wrong image?

I use Orthographic map projection to show kml file, it is no problems for most cases, but I found it displayed wrong image for some case, can you explain to me?

xmean, ymean = newPolys.centroid.get_coordinates().mean()
proj = geoplot.crs.Orthographic(central_longitude=xmean, central_latitude=ymean)
# proj = geoplot.crs.Orthographic()
fig, axs = getFigure(subplot_kw={"projection": proj})
axs.set_aspect('equal')
geoplot.polyplot(
    newPolys,
    projection = proj,
    ax = axs,
    zorder = 2,
    facecolor = "blue",
)

# Get the current latitude and longitude ranges of axs[1]
lon1, lon2 = axs.get_xlim()
lat1, lat2 = axs.get_ylim()

axs.coastlines()
adjustLim(axs, lon1, lon2, lat1, lat2)

Correct case:

enter image description here enter image description here Wrong case

enter image description here enter image description here

Upvotes: 0

Views: 28

Answers (0)

Related Questions