From a9417eb37be5025e104861dfd3ab2c32ecc159f1 Mon Sep 17 00:00:00 2001 From: elpidioassinaturas Date: Wed, 28 Oct 2026 01:06:18 -0300 Subject: [PATCH] Open the STAC dialog on sentinel-2-c1-l2a 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 --- crates/ui-egui/src/stacui.rs | 4 +++- docs/user-guide/web-data.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/stacui.rs b/crates/ui-egui/src/stacui.rs index b20995849d..b4a5cb10e1 100644 --- a/crates/ui-egui/src/stacui.rs +++ b/crates/ui-egui/src/stacui.rs @@ -184,7 +184,7 @@ impl Default for State { connection: None, listed: String::new(), collections: Vec::new(), - collection: "sentinel-2-l2a".into(), + collection: "sentinel-2-c1-l2a".into(), from: String::new(), to: String::new(), use_view: true, @@ -1166,6 +1166,8 @@ mod tests { assert_eq!(Preset::from_id(p.id()), Some(p)); } assert_eq!(Preset::from_id("nope"), None); + // The dialog opens on Collection 1: the legacy `sentinel-2-l2a` declares an offset that many of its files lack. + assert_eq!(State::default().collection, "sentinel-2-c1-l2a"); let d = days_ago(0); assert!(d.len() == 10 && d.starts_with("20"), "{d}"); let mut app = RustGisApp::with_sample(); diff --git a/docs/user-guide/web-data.md b/docs/user-guide/web-data.md index 49704861ae..26fb79f5f5 100644 --- a/docs/user-guide/web-data.md +++ b/docs/user-guide/web-data.md @@ -64,7 +64,7 @@ and `stac.addAsset` with an item returned by `stac.search` (`"item"`) or an item (`"url"`) and `"asset"`. API searches return one page and a `"next"` address when there is another: ```sh -rustgis-cli run --cmd 'stac.search={"collections":"sentinel-2-l2a","bbox":[7.4,46.9,7.5,47],"datetime":"2024-07-01/2024-07-31","maxCloud":20}' --cmd 'stac.addAsset={"url":"https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_32TLS_20240727_0_L2A","asset":"scl"}' +rustgis-cli run --cmd 'stac.search={"collections":"sentinel-2-c1-l2a","bbox":[7.4,46.9,7.5,47],"datetime":"2024-07-01/2024-07-31","maxCloud":20}' --cmd 'stac.addAsset={"url":"https://earth-search.aws.element84.com/v1/collections/sentinel-2-c1-l2a/items/S2B_T32TLS_20240727T103439_L2A","asset":"scl"}' ``` Assets can use HTTP(S) or `s3://` addresses. S3 assets use the saved connection serving their