intake / intake/intake-stac

Error due to the deprecated xr.open_rasterio() method

Open
#156 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
113
Forks
25
PR merge metrics
No merged PRs in 30d

Description

Hi,

It looks like intake-stac is affected by the [recent deprecation](https://docs.xarray.dev/en/stable/whats-new.html#id226) of `xarray.open_rasterio()` and throws errors while loading geotiff/COG files.

Here's a minimum reproducible example:
```
import intake

catalog_url = 'https://www.planet.com/data/stac/catalog.json'
cat = intake.open_stac_catalog(catalog_url)

collection = cat['planet-disaster-data']
subset = collection['hurricane-harvey']['hurricane-harvey-0831']
item = subset['Houston-East-20170831-103f-100d-0f4f-RGB']

da = item['mosaic'].to_dask()
```
![intake-stac_error](https://github.com/intake/intake-stac/assets/19339926/9bf206ac-19a8-40e2-8cd4-e48233773af1)

Before we address this issue by updating Intake-STAC, a quick solution is to downgrade xarray, for example:
```
pip install intake-stac xarray==2022.12.0
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the minimum reproducible example using intake.open_stac_catalog and item['mosaic'].to_dask(), then trace where Intake-STAC invokes the deprecated xarray.open_rasterio() method. Update the loading path so the example works without that deprecated method, and rerun it against the geotiff/COG item to verify the error is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.