-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix up the satellite projections (Fixes #1144) #1189
Conversation
9fc894f
to
e5f2807
Compare
Before this PR: After: (See #1144 for sample code.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly cleanup since we're updating things.
|
||
if b != a or globe.ellipse is not None: | ||
warnings.warn('The proj "nsper" projection does not handle ' | ||
'elliptical globes.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I've been thinking, maybe I should've moved this to a base class. Maybe change the default Globe
creation based on an __init__
parameter, or private class attribute. Something for another PR, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think there's a few more things we could hoist out of the leaf nodes in the tree of projections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or more specifically - into a factory of Globe rather than the __init__
of a baseclass.
This refactors the Geostationary and NearSidePerspective projections so that they can individually set up their boundary, limits, etc. Doing so allows fixing the incorrect boundary being set for NearSidePerspective. The two projections can't share the math for the boundary because they are fundamentally different coordinate systems.
e5f2807
to
c7df129
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Since these are two different projections, they should not share as much, so I've decoupled them a bit and updated some values.
c7df129
to
0c157fd
Compare
This refactors the
Geostationary
andNearsidePerspective
projections so that they can individually set up their boundary, limits, etc. Doing so allows fixing the incorrect boundary being set forNearsidePerspective
. The two projections can't share the math for the boundary because they are fundamentally different coordinate systems.