Reputation: 2499
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:
Upvotes: 0
Views: 28