Skip to content
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

Loading raster data doesn't seem to work with webdav #1033

Open
2 tasks done
jensdebruijn opened this issue Aug 12, 2024 · 1 comment
Open
2 tasks done

Loading raster data doesn't seem to work with webdav #1033

jensdebruijn opened this issue Aug 12, 2024 · 1 comment
Labels
Bug Something isn't working Needs refinement issue still needs refinement

Comments

@jensdebruijn
Copy link

jensdebruijn commented Aug 12, 2024

HydroMT version checks

  • I have checked that this issue has not already been reported.
  • I have checked that this bug exists on the latest version of HydroMT.

Reproducible Example

import hydromt
import fsspec
import rioxarray

data_catalog = hydromt.DataCatalog(data_libs=["data_catalog.yml"])

# This results in an error
# rasterio.errors.RasterioIOError: webdav+https://files.isric.org/soilgrids/latest/data/sand/sand_0-5cm_mean.vrt: No such file or directory
# soilgrids = data_catalog.get_rasterdataset("soilgrids_test")


# but using fsspec directly works
soilgrids = data_catalog.get_source("soilgrids_test")
with fsspec.open(
    soilgrids.path,
    mode="rb",
    base_url=soilgrids.storage_options["base_url"],
) as f:
    da = rioxarray.open_rasterio(
        f,
    ).squeeze(drop=True)

    print(da)

data_catalog.yml:

soilgrids_test:
data_type: RasterDataset
driver: raster
filesystem: webdav
path: webdav://soilgrids/latest/data/sand/sand_0-5cm_mean.vrt
storage_options:
base_url: https://files.isric.org

Current behaviour

The data doesn't load, but results in the following error:

rasterio.errors.RasterioIOError: webdav+https://files.isric.org/soilgrids/latest/data/sand/sand_0-5cm_mean.vrt: No such file or directory

Desired behaviour

The data is loaded using webdav

Additional context

No response

@jensdebruijn jensdebruijn added Bug Something isn't working Needs refinement issue still needs refinement labels Aug 12, 2024
@Jaapel
Copy link
Contributor

Jaapel commented Aug 20, 2024

Hi @jensdebruijn , thanks for reporting. This issue may be solved in v1: #1026.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Needs refinement issue still needs refinement
Projects
None yet
Development

No branches or pull requests

2 participants