Skip to content

Fix whole-coverage requests for GDAL virtual paths - #2407

Open
Shubham-Padkonde wants to merge 1 commit into
geopython:masterfrom
Shubham-Padkonde:fix/rasterio-vsi-native-coverage
Open

Shubham-Padkonde wants to merge 1 commit into
geopython:masterfrom
Shubham-Padkonde:fix/rasterio-vsi-native-coverage

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Overview

Whole-coverage requests for GDAL virtual paths currently call read_data, which treats paths such as /vsigs/, /vsimem/ and /vsizip/ as ordinary local files. The provider opens the dataset successfully but then raises FileNotFoundError when no bbox, bands or subsets are requested.

Exclude /vsi... paths from that shortcut so they use the existing rasterio reading and serialization path. Ordinary local-file downloads retain their byte-for-byte shortcut. No dependencies or public interfaces change.

Related Issue / discussion

Fixes #2402. Reproduction and proposed scope are recorded in the issue. The linked frontend workaround adds a bbox; this fixes the underlying whole-coverage request.

Additional information

  • Added real in-memory and ZIP-backed GeoTIFF regressions, plus an ordinary local-file control. Both virtual-path cases fail before the fix; all three pass after it. Output checks cover every band, pixel values, CRS, transform and nodata.
  • All seven rasterio provider tests pass.
  • Coverage API, rasterio provider and offline utility checks: 52 passed, 3 deselected on Linux/Python 3.12, NumPy 2.0.1, pyproj 3.7.2 and rasterio 1.5.1.
  • Full-repository flake8 and git diff --check pass.
  • The three deselected utility checks rely on external network access: two fail resolving pygeoapi.io here, and the GitHub image prefetch test receives no content-length. No utility code is changed.
  • Full database-backed integration suites and an authenticated GCS request were not run. The two actual GDAL virtual filesystem tests exercise the failing shortcut without cloud credentials. Virtual outputs use the existing serialization behavior rather than promising byte-identical source files.
  • Developed and tested with Codex assistance.

Dependency policy (RFC2)

  • This change adds/removes no dependencies and meets RFC2 requirements.

Updates to public demo

  • No breaking changes or demo configuration changes are required.

Contributions and licensing

  • This bugfix is contributed under the repository's existing MIT license, consistent with its Contributions and Licensing Guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rasterio Coverage Requests Fail for GCS/VSI Paths Without Bbox Parameter

1 participant