feat: différencier visuellement Sentinel-2 (fiable) vs Sentinel-3 (bruit)

S3 OLCI n'a pas de bande SWIR : impossible de filtrer sun glint résiduel
et aérosols sahariens → faux positifs massifs à 300 m de résolution.

- Tuiles : ajout des propriétés source/confidence/coverage_km2
- Carte : styling data-driven par source
    S2 → orange vif (#f4720a), opacité 65 % — signal confirmé
    S3 → or pâle (#d4b830), opacité 20 % — signal incertain
- Légende : entrées distinctes S2 / S3

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gwadaking
2026-04-14 12:33:11 -04:00
parent 08a4754b26
commit 14d2acc39b
4 changed files with 54 additions and 13 deletions

View File

@@ -63,7 +63,11 @@ class GenerateTilesCommand extends Command
private function queryObservationsGeoJSON(): ?string
{
$rows = $this->connection->fetchAllAssociative(
"SELECT ST_AsGeoJSON(geometry) AS geometry, COALESCE(afai_mean, 0) AS afai
"SELECT ST_AsGeoJSON(geometry) AS geometry,
COALESCE(afai_mean, 0) AS afai,
source,
confidence,
ROUND(COALESCE(coverage_area, 0)::numeric, 1) AS coverage_km2
FROM sargassum_observation
WHERE detected_at >= NOW() - INTERVAL '30 days'
AND coverage_area > 0
@@ -71,7 +75,10 @@ class GenerateTilesCommand extends Command
);
return $this->buildFeatureCollection($rows, [
'afai' => static fn($r) => (float) $r['afai'],
'afai' => static fn($r) => (float) $r['afai'],
'source' => static fn($r) => $r['source'], // 'Sentinel-2' | 'Sentinel-3'
'confidence' => static fn($r) => (float) $r['confidence'],
'coverage_km2' => static fn($r) => (float) $r['coverage_km2'],
]);
}