Skip to content

Agricultural growth stage: convert the quarterly mosaics script to data fusion - #374

Open
azlinszkysinergise wants to merge 2 commits into
sentinel-hub:mainfrom
azlinszkysinergise:update-quarterly-mosaics-datafusion
Open

Agricultural growth stage: convert the quarterly mosaics script to data fusion#374
azlinszkysinergise wants to merge 2 commits into
sentinel-hub:mainfrom
azlinszkysinergise:update-quarterly-mosaics-datafusion

Conversation

@azlinszkysinergise

Copy link
Copy Markdown
Contributor

The quarterly_mosaics.js variant of the Agricultural growth stage script was a V1 script with a //VERSION=3 (auto-converted from 1) header. It sorted a single long time range into quarters by scene date, which doesn't work in Copernicus Browser: requests spanning more than 180 days are rejected, and three quarterly mosaics span at least 181.

This rewrites it as a proper V3 data fusion script. The three mosaics load as data sources Q1, Q2, Q3 (oldest to most recent), each bound to its RGB channel explicitly instead of inferred from scenes[i].date. dataMask is now requested and the output has an alpha channel, so pixels missing from any quarter come back transparent rather than as a misleading partial composite. The preProcessScenes filter and the quarter-arithmetic branches are gone.

The README gains a "How to use" section for the data fusion setup, including the Copernicus Browser gotcha that the collection id field wants the bare UUID — pasting the full byoc-… id doubles the prefix and fails with a blank layer and no error.

Also adds fig/fig2.jpg (Great Hungarian Plain, April/July/October 2025 mosaics) and one link line on the Data Fusion index page — that index file is shared, so it's the only file here outside the script folder.

🤖 Generated with Claude Code

azlinszkysinergise and others added 2 commits September 3, 2026 15:36
…usion

Copernicus Browser rejects evalscript requests spanning more than 180
days. Three consecutive quarterly mosaics span at least 181 days, so the
previous single-time-range version can no longer load all three.

Load the three mosaics as separate data sources named Q1, Q2 and Q3
instead, each with its own date. Dropping ORBIT mosaicking also removes
preProcessScenes and the scene-date arithmetic that inferred which
quarter belonged in which channel - the mapping is now explicit - and
adds a dataMask guard for no-data pixels.

Rework the README how-to into one section per script, documenting the
three-data-source setup. Note that the collection id field in Copernicus
Browser prepends "byoc-" itself, so the bare UUID must be pasted; the
doubled prefix fails with a blank layer and no error message.

Add fig2, the script over the central Great Hungarian Plain.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The script lives under sentinel-2/ but uses data fusion, so it is
otherwise invisible to anyone browsing for fusion examples. Follows the
existing cross-listing of /sentinel-3/land_surface_temperature.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant