Agricultural growth stage: convert the quarterly mosaics script to data fusion - #374
Open
azlinszkysinergise wants to merge 2 commits into
Open
Conversation
…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>
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.
The
quarterly_mosaics.jsvariant 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 fromscenes[i].date.dataMaskis 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. ThepreProcessScenesfilter 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