[Feature]: `raster.mosaic` matches each input to the one above it in their overlap, and can feather the seam
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
Direzione di ricerca
Start at the raster.mosaic command: find where inputs are ordered and blended so you can see how "first wins" is applied today, and where per-band data and no-data are handled. Then look at the existing raster.function bandMath and the histogram-matching code referenced as geolibre:histogram_matching_two_images for reusable quantile/CDF fitting. Done means optional match and feather parameters defaulting to today's behaviour, per-band gain/offset reported in the result's matched list, and tests over synthetic overlapping rasters covering the no-overlap notice and the Int16 output type.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Before you start
- I searched the existing issues and did not find a duplicate (#2585 is about masking dates in
cube.reduce; this is about joining scenes of different days). - This is a feature request.
What is missing?
raster.mosaic puts inputs together with "the first wins where they overlap". Scenes from different days rarely have the same gain and offset, so the seam shows. Today the user has to measure the overlap elsewhere, then apply raster.function bandMath by hand, then mosaic.
Example (CBERS-4A WPM panchromatic, 2 m, Viçosa-MG; 19/08/2024 on top of 14/08/2024, overlap 42 % of the area):
| mean in overlap | std. dev. in overlap | |
|---|---|---|
| 19/08 (top) | 213.2 | 42.9 |
| 14/08 (below) | 216.6 | 63.8 |
14/08 × 0.8025 + 41.9 (quantile fit, by hand + bandMath) |
215.4 at the seam | 46.7 at the seam |
14/08 through geolibre:histogram_matching_two_images |
215.0 at the seam | 44.2 at the seam |
The brightness jump at the seam is small (+4 DN of 212); the visible difference is contrast, which the fit removes. geolibre:histogram_matching_two_images matches whole histograms, including the parts that do not overlap, so it cannot be told to use the overlap only.
Proposal
Two optional parameters on raster.mosaic:
raster.mosaic {"inputs": [top, …, bottom], "match": "linear" | "histogram" | "none", "feather": metres}
match: each input, from the second down, is fitted to what is already above it in their overlap only (cells valid in both), then mosaicked.feather: across the seam, the lower input fades into the upper one over that distance (distance to the upper input's edge), instead of a hard cut.
Choices in this proposal
- Default
"none"andfeather0: today's results do not change. "linear"fits gain and offset from quantiles 5–95 of the overlap (a line through matched quantiles), not mean and standard deviation: clouds and their shadows in one scene pull the moments, the quantile fit less so."histogram"maps full CDFs of the overlap, for scenes from different sensors.- Fit in the overlap only, per band; with no overlap (or under 1 % of the smaller input), the input is left as it is and a notice says so.
- The fitted gain and offset are listed in the result (
"matched": [{"input": …, "gain": …, "offset": …, "cells": …}]), so a script or plugin can report them. - The output keeps the inputs' data type (an Int16 mosaic stays Int16, rounded), with no-data kept; today a
bandMathstep turns it into Float32. - Feathering is linear in distance and uses the valid-data edge of the upper input, not its rectangle (scene edges in these products are diagonal).
Environment
RustGIS 0.7.0 (Windows 11, x64), MCP rustgis-cli.
- Lingua principale
- Rust
- Stelle
- 1.9k
- Fork
- 268
- Merge medio
- 11h 1m
- PR unite (30g)
- 942
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di opengeos/RustGIS
-
[Bug]: layer.move to the place a layer already has fails and stops a script; with several layers it leaves an empty undo stepForse già presa @jgregoriorincon l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
opengeos/RustGIS#2621 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
opengeos/RustGIS#1446 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di opengeos/RustGIS
Issue simili
-
文件夹重大BUG:不支持重命名Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
postgresql-rules / queue-rules: implicit KEY SHARE before a parent key update, and job self-overlapAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
jonathanong/no-mistakes#3879 ·
I maintainer di solito rispondono entro 1 giorno
-
area:index v0.35.0
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pbakaus/impeccable#1653 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
nautechsystems/nautilus_trader#5741 ·
I maintainer di solito rispondono entro 1 giorno