Comments (27)
Yes, here's the rather lame way I'm dealing with overviews now: https://nbviewer.jupyter.org/gist/rsignell-usgs/0f96bb9c0ca34a5dd0fc8131a7bbae1c
I was hoping for something better. πΊ
from rioxarray.
Do you happen to have one with overviews?
from rioxarray.
rds.overviews(1)
[]
from rioxarray.
Perfect, thanks! Mind if I add it to the repo? Also, mind if I add you to the contributor list for testing?
from rioxarray.
sure, no worry ;-)
from rioxarray.
rioxarray
has the rioxarray.open_rasterio()
function which uses rasterio.open()
under the hood and should be able to open anything handled by rasterio.open()
. Do you have an example GOG overlay to try?
from rioxarray.
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?
from rioxarray.
Before I knew about the existance of rioxarray, I raised the issue here:
pydata/xarray#3269
with an idea of at least being able to manually request a specific overview via an additional parameter request.
from rioxarray.
Maybe three kwargs?
overlay_index
to select the resampling factor from the overlay index.resampling_factor
to pass in resampling read scale factor https://rasterio.readthedocs.io/en/latest/topics/resampling.htmlresampling_method
Also found this useful for reference:
https://automating-gis-processes.github.io/CSC/notebooks/L5/read-cogs.html
from rioxarray.
from rioxarray.
https://gist.github.com/snowman2/9c15df64bd290d1ffd928e0b66855b07
You can try it out with code in #48. It does not allow you to switch between overviews at the moment (it just seems to load in the highest resolution). So, needs more research. But, the first overview read works.
from rioxarray.
Issue addressed. It was related to: rasterio/rasterio#1504
from rioxarray.
@rsignell-usgs any issues using the URL from your example for an example in rioxarray
? Is it a temporary file or a longer term file?
from rioxarray.
@vincentsarago do you happen to have a small test-sized COG tif
file that could be used for testing?
from rioxarray.
@snowman2 https://github.com/cogeotiff/rio-cogeo/blob/master/tests/fixtures/image_rgb.tif ?
from rioxarray.
π€¦ββ
from rioxarray.
Sorry about that, this one should be better https://www.dropbox.com/s/g6etn6o9x3bed62/cog.tif?dl=0
from rioxarray.
@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.
from rioxarray.
@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?
from rioxarray.
@snowman2 on https://openaerialmap.org you should find what you need
from rioxarray.
@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.
from rioxarray.
@snowman2 you can find the link on the little arrow down
from rioxarray.
Nice, thanks for that π
from rioxarray.
Updated: https://corteva.github.io/rioxarray/html/examples/COG.html
from rioxarray.
@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 ideas
?
from rioxarray.
@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.
from rioxarray.
Nice! The notebook looks much simpler to use.
Sounds good, I will add you in a bit.
from rioxarray.
Related Issues (20)
- rioxarray.open_rasterio(file) doesn't work HOT 1
- Support GCPs without known z coordinate HOT 3
- `spatial_ref` coordinate not accessible after saving dataset HOT 2
- Add a rio.fill.fillnodata-based nodata interpolation in addition to existing scipy-based HOT 1
- write somewhere in the documentation that extentions are not respecting F401
- Rename bands as variables using long_name attribute HOT 8
- typo in docs
- `rio.transform()` does not retrieve exact transform stored in `rio.write_transform()` HOT 2
- Document difference between `set_crs` and `write_crs` HOT 4
- Typo in docs: longitute
- Fail to reproject and reproject_match a dataset with rotation affine. HOT 3
- reproject_match renames dims HOT 2
- Xarray padding with mode='reflect'
- Padding and Croping doesn't end up same result HOT 2
- overview_level failing in xarray with engine='rasterio' due to missing doc? HOT 2
- Rio array merge missing HOT 3
- Delayed/chunked opening (sentinel) SAFE data with bands as variables fails HOT 1
- `reproject_match` raises `MissingSpatialDimensionError` with spatial dims set HOT 1
- Save larger raster with zstd compression writes dirty block HOT 3
- Memory leak when looping through data variables of a dataset loaded from a VRT HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rioxarray.