fix: tiles filtrées sur coverage_area > 0 au lieu de afai_mean > 0

This commit is contained in:
Gwadaking
2026-04-14 01:48:39 -04:00
parent 2c41832d02
commit c134e14ec0

View File

@@ -63,10 +63,10 @@ class GenerateTilesCommand extends Command
private function queryObservationsGeoJSON(): ?string private function queryObservationsGeoJSON(): ?string
{ {
$rows = $this->connection->fetchAllAssociative( $rows = $this->connection->fetchAllAssociative(
"SELECT ST_AsGeoJSON(geometry) AS geometry, afai_mean AS afai "SELECT ST_AsGeoJSON(geometry) AS geometry, COALESCE(afai_mean, 0) AS afai
FROM sargassum_observation FROM sargassum_observation
WHERE detected_at >= NOW() - INTERVAL '30 days' WHERE detected_at >= NOW() - INTERVAL '30 days'
AND afai_mean > 0 AND coverage_area > 0
ORDER BY detected_at DESC" ORDER BY detected_at DESC"
); );