-
Notifications
You must be signed in to change notification settings - Fork 388
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
Conversation
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.
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.
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.
@greglucas, thanks for reviewing!
Co-authored-by: Greg Lucas <greg.m.lucas@gmail.com>
Thanks @edsaac! |
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:imshow
fails when transform projection is different that the axes projection #2480Implications
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: