-
Notifications
You must be signed in to change notification settings - Fork 389
Added winkel tripel projection class #2442
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
d550f65
6210860
1511ceb
de76b10
31dc6c7
ced358f
0d1baff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2539,6 +2539,33 @@ def transform_points(self, src_crs, x, y, z=None, trap=False): | |
| return result | ||
|
|
||
|
|
||
| class WinkelTripel(_WarpedRectangularProjection): | ||
| """ | ||
| A Winkel-Tripel projection. | ||
|
|
||
| Compromise modified azimuthal projection that is less distorted | ||
| and more area-accurate. It is comparable to the Robinson | ||
| projection in both appearance and popularity. | ||
|
|
||
| The National Geographic Society uses the Winkel-Tripel projection | ||
| for most of the maps they produce. | ||
| """ | ||
|
|
||
| def __init__(self, central_longitude=0.0, globe=None): | ||
| globe = globe or Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS) | ||
| proj4_params = [('proj', 'wintri'), | ||
| ('lon_0', central_longitude), | ||
| ('lat_0', 0.0)] | ||
|
||
|
|
||
| super().__init__(proj4_params, | ||
| central_longitude, | ||
|
||
| globe=globe) | ||
greglucas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| @property | ||
| def threshold(self): | ||
| return 1e4 | ||
|
|
||
|
|
||
| class InterruptedGoodeHomolosine(Projection): | ||
| """ | ||
| Composite equal-area projection emphasizing either land or | ||
|
|
||
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.
Do we need to do any of the nan handling here like we are doing in the Robinson projection? i.e. should this subclass
Robinsoninstead if it is similar to that?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.
I was able to generate maps containing maps with no problem. Are there other tests for nans that I would need to do?