-
Notifications
You must be signed in to change notification settings - Fork 85
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
Does rioxarray allow easy loading of COG overviews into xarray? #45
Comments
|
Yes, here's the rather lame way I'm dealing with overviews now: https://nbviewer.jupyter.org/gist/rsignell-usgs/0f96bb9c0ca34a5dd0fc8131a7bbae1c |
Nice example. I don't think we have anything better than that at the moment, but it sounds like that would be pretty useful to add. Currently the open function reads data like so: Line 132 in 83e321c
I think this will need to be thought through a bit as the current implementation uses windowed reading for lazy loading. When using COG overview, it seems that everything needs to be scaled. My current thoughts on adding support for this is to add support for decimated reading. Other ideas? |
Before I knew about the existance of rioxarray, I raised the issue here: |
Maybe three kwargs?
Also found this useful for reference: |
https://gist.github.com/snowman2/9c15df64bd290d1ffd928e0b66855b07 |
Issue addressed. It was related to: rasterio/rasterio#1504 |
@rsignell-usgs any issues using the URL from your example for an example in |
@vincentsarago do you happen to have a small test-sized COG |
rds.overviews(1)
[] |
🤦♂ |
Sorry about that, this one should be better https://www.dropbox.com/s/g6etn6o9x3bed62/cog.tif?dl=0 |
Perfect, thanks! Mind if I add it to the repo? Also, mind if I add you to the contributor list for testing? |
sure, no worry ;-) |
@snowman2 I intend to leave the Southern California DEM COG there for a few months or so, but after that, it will hopefully move back to sciencebase.gov, so probably not the best to use for long-term examples. |
@rsignell-usgs That is good to know. Thanks for letting me know. Are you aware of any COG files that are accessible via URL and are more long term? |
@snowman2 on https://openaerialmap.org you should find what you need |
Thanks for the link. I took a quick look and it seems like it provides tiled endpoints, but I couldn't find an endpoint to a COG. I am probably missing something, so please point it out if I am. |
|
Nice, thanks for that 👍 |
@rsignell-usgs, this was a good idea and you provided useful examples to help implement this feature. Mind if I add you to the contributors list for |
@snowman2 , sure that would be great! BTW, here's my new streamlined hillshade notebook using the overview enhancement of #48 and the CRS help supplied in #49. |
Nice! The notebook looks much simpler to use. Sounds good, I will add you in a bit. |
Does rioxarray allow loading image data from the COG overviews into xarray?
I didn't find it but just wanted to make sure I didn't miss it.
The text was updated successfully, but these errors were encountered: