Skip to content

DOC: Add a raster reprojection example #2496

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

Merged
merged 3 commits into from
Apr 17, 2025

Conversation

edsaac
Copy link
Contributor

@edsaac edsaac commented Jan 28, 2025

Rationale

Plotting a raster image with ax.imshow requires data to be warped and reprojected. This does not works well if the map's extent is not set in advance. I am adding an additional example to the documentation to cover that common pitfall:

Implications

This is just an additional example to put in the documentation; no functionality in the package is modified. Below is a screenshot of rebuilding the docs with sphinx:

sphinx-build -M html docs/source/ docs/build

image

@CLAassistant
Copy link

CLAassistant commented Jan 28, 2025

CLA assistant check
All committers have signed the CLA.

@edsaac edsaac changed the title Add a raster reprojection example DOC: Add a raster reprojection example Apr 10, 2025
Copy link
Contributor

@greglucas greglucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry this as lingered @edsaac! I think this is a good quick example of a possible papercut while using Cartopy and how to avoid it. It would be nice if we could fix the underlying cause and not be dependent on the order of calling set_extent, but this is a good first step of highlighting the issue.

I have a few nits on wordsmithing, feel free to modify those even further.

Copy link
Contributor Author

@edsaac edsaac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@greglucas, thanks for reviewing!

Co-authored-by: Greg Lucas <greg.m.lucas@gmail.com>
@greglucas greglucas merged commit 824cb14 into SciTools:main Apr 17, 2025
23 checks passed
@greglucas
Copy link
Contributor

Thanks @edsaac!

@QuLogic QuLogic added this to the 0.25 milestone Aug 10, 2025
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.

4 participants