Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
load_tile_map: Add the new parameter 'crs' to set the CRS of the returned dataarray #3554
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
load_tile_map: Add the new parameter 'crs' to set the CRS of the returned dataarray #3554
Changes from all commits
3304104
cfb69d2
00e2605
3265240
7660e2c
421c167
8346af7
4ed799c
6733e19
c1d55b0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Maybe put the
rasterio
imports in the rioxarray block below instead of here.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.
rasterio
is a known dependency ofcontextily
(xref: https://github.com/geopandas/contextily/blob/main/pyproject.toml), so it makes more sense to assume that they're installed together.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.
Rasterio is also a dependency of
rioxarray
😆. I would argue thatrasterio
is more tightly coupled torioxarray
, and sincerasterio
/rioxarray
are both used for their projection system capabilities, it would make more sense to put those together. But ok too if you want to keep it here.Check warning on line 176 in pygmt/datasets/tile_map.py
pygmt/datasets/tile_map.py#L175-L176
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.
The
Figure.tilemap
method no longer requiresrioxarray
explicitly. Instead,load_tile_map
will raise the error.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.
If
lonlat=True
, set the CRS to letload_tile_map
do the raster reprojection for us.