Repository navigation
Open the STAC dialog on sentinel-2-c1-l2a - #1069
Conversation
The legacy sentinel-2-l2a declares raster:bands offset -0.1, but many of its files lack the +1000 offset that removes, so reflectance read with the declared offset comes out about 0.1 too low. Collection 1 matches its metadata, and the Sentinel-2 preset and the data cube catalog already use it. Switch the web-data guide's stac.search example to it as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Update the default and example crates/ui-egui/src/stacui.rs, docs/user-guide/web-data.md |
The STAC dialog defaults to sentinel-2-c1-l2a. The preset test asserts the default and notes the legacy collection’s offset issue. The CLI example uses the Collection 1 collection and item URL, while retaining the scl asset. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: giswqs
Merge Risk: 
Minimal · up to a9417
-
The collection default and example are consistent with the requested update. No merge-blocking issue is identified; merge after normal checks pass.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Description check
-
Explanation
The description explains the change, rationale, affected files, scope, linked issue, and verification of the replacement item and asset. It does not include a dedicated Testing or UI evidence section, but the description is otherwise complete and the omissions are non-critical for this small change.
Full details: Linked Issues check
-
Explanation
The change satisfies issue
#1054.State::default()now usessentinel-2-c1-l2a. The existing test module asserts this default. Thedocs/user-guide/web-data.mdexample updates both the collection and matching Earth Search item ID. The diff does not patch legacy pixel values, and it does not remove legacy collection selection.
Full details: Out of Scope Changes check
-
Explanation
The diff contains only the requested default change, its automated test assertion, and the requested documentation example update for issue
#1054. No unrelated provider example, localization file, or pixel-value correction changed.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit hops through fields of green,
The new collection joins the scene.
The STAC default is set just right,
Its test keeps watch both day and night.
The scl stays close for readers to find.
Comment @coderabbitai help to get the list of available commands.
Code reviewBugs: None found. The default collection pairs correctly with the default API ( Security: None found. The diff only changes a string default and docs text. Confidence: high. Performance: None found. Confidence: high. Quality: Nit, not posted inline. The new assertion checks AGENTS.md: Compliant. No Not verified: I had no network access, so I could not check these claims:
Neither is a defect in the diff as written. Change sizeCompared with
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. |
Summary
The STAC dialog now opens on Earth Search's
sentinel-2-c1-l2ainstead of the legacysentinel-2-l2a.The legacy collection's reflectance bands declare
scale: 0.0001, offset: -0.1, but many of its files don't carry the +1000 offset that the -0.1 removes. Read with the declared offset, their reflectance comes out about 0.1 too low, often negative. Collection 1 matches its metadata. The dialog's Sentinel-2 preset and the data cube catalog (#871) already use it, so only the dialog's default and one docs example were left on the legacy collection.Evidence is in #1054: for tile 23MQQ on 2025-06-07, the red band's mean stored value was 610 in the legacy collection (87% of pixels below 1000) and 1,609 in Collection 1 (none below 1000).
Fixes #1054
Changes
crates/ui-egui/src/stacui.rs:State::defaultstarts onsentinel-2-c1-l2a. The existing preset test gets one line for the default.docs/user-guide/web-data.md: thestac.search/stac.addAssetexample usessentinel-2-c1-l2aand a matching item id (S2B_T32TLS_20240727T103439_L2A, same tile and day as the old example). I checked that the item and itssclasset exist on Earth Search.Choices and limits
sentinel-2-l2astill works, for scenes not yet reprocessed. Itsvisualasset andsclclasses aren't affected.docs/installation.mdlinks a Planetary Computer item. That is another provider'ssentinel-2-l2a, so it is left as it is.i18n/*.tsv.🤖 Generated with Claude Code
Summary by CodeRabbit
sentinel-2-c1-l2a.