diff --git a/backend/src/Command/GenerateTilesCommand.php b/backend/src/Command/GenerateTilesCommand.php index d9063eb..710b8e9 100644 --- a/backend/src/Command/GenerateTilesCommand.php +++ b/backend/src/Command/GenerateTilesCommand.php @@ -63,10 +63,10 @@ class GenerateTilesCommand extends Command private function queryObservationsGeoJSON(): ?string { $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 WHERE detected_at >= NOW() - INTERVAL '30 days' - AND afai_mean > 0 + AND coverage_area > 0 ORDER BY detected_at DESC" );