-
Notifications
You must be signed in to change notification settings - Fork 447
added albers_conical_equal_area projection #1344
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -66,6 +66,34 @@ def test_globe_spheroid(): | |
| assert globe_params['a'] == 6367000 | ||
| assert globe_params['b'] == 6360000 | ||
|
|
||
|
|
||
| def test_aea(): | ||
rsignell-usgs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| """Test handling albers equal area projection.""" | ||
| attrs = {'grid_mapping_name': 'albers_conical_equal_area', 'earth_radius': 6367000, | ||
| 'standard_parallel': [20, 50]} | ||
| proj = CFProjection(attrs) | ||
|
|
||
| crs = proj.to_cartopy() | ||
| assert isinstance(crs, ccrs.AlbersEqualArea) | ||
| assert crs.proj4_params['lat_1'] == 20 | ||
| assert crs.proj4_params['lat_2'] == 50 | ||
| assert crs.globe.to_proj4_params()['ellps'] == 'sphere' | ||
|
|
||
|
|
||
| def test_aea_minimal(): | ||
| """Test handling albers equal area projection with minimal attributes.""" | ||
| attrs = {'grid_mapping_name': 'albers_conical_equal_area'} | ||
| crs = CFProjection(attrs).to_cartopy() | ||
| assert isinstance(crs, ccrs.AlbersEqualArea) | ||
|
|
||
|
|
||
| def test_aea_single_std_parallel(): | ||
| """Test albers equal area with one standard parallel.""" | ||
| attrs = {'grid_mapping_name': 'albers_conical_equal_area', 'standard_parallel': 25} | ||
| crs = CFProjection(attrs).to_cartopy() | ||
| assert isinstance(crs, ccrs.AlbersEqualArea) | ||
| assert crs.proj4_params['lat_1'] == 20 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not seem to match with the attrs that was set (attrs says 25, this says 20), which is causing test suite to now fail after the fixes I'm working on in #1325. @dopplershift Can I update it there to get tests passing?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sigh Yes. This is why we need CI working, because I suck at code review. |
||
|
|
||
|
|
||
| def test_lcc(): | ||
| """Test handling lambert conformal conic projection.""" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.