Skip to content

expose data_type and nodata in job results - #547

Merged
bossie merged 7 commits into
masterfrom
863-round-trip-nodata
Oct 28, 2026
Merged

bossie merged 7 commits into
masterfrom
863-round-trip-nodata

Conversation

@bossie

@bossie bossie commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

To be able to properly load_stac our own STAC 1.0 job results as described in Open-EO/openeo-geotrellis-extensions#658 (comment).

Open-EO/openeo-geotrellis-extensions#863

@bossie bossie linked an issue Oct 23, 2026 that may be closed by this pull request
@bossie bossie changed the title expose data_type and nodata expose data_type and nodata in job results Oct 23, 2026
@bossie

bossie commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot bump the alpha version and add a CHANGELOG entry.

Co-authored-by: bossie <1032518+bossie@users.noreply.github.com>

Copilot AI commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

@copilot bump the alpha version and add a CHANGELOG entry.

Bumped the alpha to 0.142.0a4 and added the changelog entry in commit 146dd5e.

Co-authored-by: bossie <1032518+bossie@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Non-finite no-data values are not JSON-safe, raster extension declarations are missing, and assets without EO band metadata skip backfilling.

3 open issues
What changed in this PR

This PR exposes raster data types and no-data values in batch job results so the backend can reload its own STAC output through load_stac without guessing those values.

Changes:

  • Adds asset-level metadata for STAC 1.1 and raster-band metadata backfilling for STAC 1.0.
  • Updates dummy data and result-response assertions.
  • Documents the change and bumps the development version to 0.142.0a4.
File Description
tests/​test_views.py Adds expected raster metadata to job-result responses.
openeo_driver/​dummy/​dummy_backend.py Adds a raster data type to the sample TIFF asset.
openeo_driver/​backend_/​_geopyspark.py Exposes and backfills raster metadata in STAC assets.
openeo_driver/​_version.py Bumps the development version.
CHANGELOG.md Records the metadata exposure change.

Review effort: Balanced

Comment thread openeo_driver/backend_/_geopyspark.py Outdated
Comment thread openeo_driver/backend_/_geopyspark.py Outdated
Comment on lines +475 to +477
raster_bands = result_dict.get("raster:bands")
if raster_bands is None:
if "nodata" in asset_metadata or "data_type" in asset_metadata:
Comment on lines +478 to +481
result_dict["raster:bands"] = [
dict_no_none(data_type=asset_metadata.get("data_type"), nodata=asset_metadata.get("nodata"))
for _ in bands
]
Co-authored-by: bossie <1032518+bossie@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new regression tests lack a required Flask context, and raster metadata enrichment skips assets without a separate band list.

3 open issues
1 previously missed issue

In code that hasn't changed since last review

Medium severity Existing raster bands skip asset metadata enrichment

openeo_driver/​backend_/​_geopyspark.py:488

For STAC 1.0 assets with existing raster:bands but no separate bands list, this guard skips enrichment and omits asset-level data_type and nodata from the raster entries. Move enrichment outside if bands, keeping the band-count requirement only for synthesizing a new array, and add a regression test for absent or empty bands.

1 resolved since last review

Review effort: Balanced

Comment thread tests/test_views.py Outdated
user_id="user-123",
filename="output.tiff",
asset_metadata={
"href": "https://example.test/output.tiff",
@bossie
bossie merged commit ab45c4d into master Oct 28, 2026
2 of 5 checks passed
@bossie
bossie deleted the 863-round-trip-nodata branch October 28, 2026 11:40
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.

Round trip nodata

3 participants