GeoZarr / Zarr v3 reflectance support (experimental)#283
Draft
wietzesuijker wants to merge 1 commit intostac-utils:mainfrom
Draft
GeoZarr / Zarr v3 reflectance support (experimental)#283wietzesuijker wants to merge 1 commit intostac-utils:mainfrom
wietzesuijker wants to merge 1 commit intostac-utils:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
STAC catalogs typically distribute satellite raster data as Cloud Optimized GeoTIFF (COG) assets, which GIS software such as QGIS can stream efficiently.
Within EOPF, there is ongoing progress toward a more cloud-native distribution using GeoZarr / Zarr v3. However, most GIS tooling does not (yet) support this format well in practice because it is new, and the data is chunked into many (often sparsely accessed) blobs, which changes access patterns and can trigger a large number of small remote reads.
Summary
This PR adds experimental support for Zarr v3 / GeoZarr reflectance assets so they can be visualized in QGIS quickly (XYZ preview) and inspected for values (GDAL VRT-backed raster "data" layer). The aim for now is to gather feedback for further development. See screen recording for a quick demo that loads a stac item and visualizes a preview of the data + raster pixel values (the preview/xyz layer is at the bottom and the "data" layer at the top).
stac-qgis-geozarrv3.mp4
User-facing behavior
xyzlink and the asset roles includereflectance, the plugin adds a fast XYZ preview layer ((preview)), then adds a separate raster data layer ((data)) built from a GDAL VRT and hides it by default.Implementation details
lib/to load first (so QGIS’ bundled packages don’t override it).application/vnd+zarr) and treat them as raster assets.zarr.jsonendpoints.proj:epsg/proj:code+ a 6-valueproj:transform(GDAL GeoTransform).WARNING Surface Reflectance (data) : Sharded chunk range out of bounds)Testing notes
xyzlink.Close QGIS.
Find your QGIS profile plugin folder:
~/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgis_stac~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgis_stac%APPDATA%\QGIS\QGIS3\profiles\default\python\plugins\qgis_stacBack up the installed plugin folder.
Overlay this repo’s code from
qgis-stac-plugin/src/qgis_staconto the installedqgis_stacfolder, preservingmetadata.txt.Example (macOS/Linux) using
rsync:Start QGIS and enable/reload the plugin.
(preview)XYZ layer is added quickly.(data)raster layer is added (hidden) and can be toggled on for Identify/value inspection.