Skip to content
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

Calculate vertical coord, even if not explicitely requested #2077

Merged
merged 3 commits into from
Sep 7, 2022

Conversation

guziy
Copy link
Contributor

@guziy guziy commented Sep 4, 2022

Compute and return vertical coordinate z even if the input coordinates contain only x,y, and z=None. This covers the transformation from lat/lon coordinates to the 3d spatial coordinates with the origin at the Earth's center.

For this assume that z=0 for all 2d inputs.

Rationale

Fixes: #2032

Implications

I guess this might slow down the code slightly in cases when the z coordinate is not needed, but it should be really minimal.

lib/cartopy/crs.py Outdated Show resolved Hide resolved
@dopplershift dopplershift added this to the 0.21 milestone Sep 7, 2022
@dopplershift dopplershift merged commit 8124fcb into SciTools:main Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

regression bug in cartopy 0.20?, as_geocentric() not functionning as expected
3 participants