diff --git a/backend/src/Command/IngestSentinelCommand.php b/backend/src/Command/IngestSentinelCommand.php index 12d5e1c..56f4167 100644 --- a/backend/src/Command/IngestSentinelCommand.php +++ b/backend/src/Command/IngestSentinelCommand.php @@ -16,13 +16,11 @@ use Symfony\Component\Console\Style\SymfonyStyle; )] class IngestSentinelCommand extends Command { - // Zones d'intérêt Antilles : [minLon, minLat, maxLon, maxLat] + // Zone d'intérêt : archipel guadeloupéen uniquement. + // Bbox : couvre Les Saintes, La Désirade, Grande-Terre, Basse-Terre, + // Marie-Galante + ~350 km d'océan à l'est pour détecter les sargasses en approche. private const ZONES = [ - 'martinique' => [-61.30, 14.30, -60.70, 14.90], - 'guadeloupe' => [-61.90, 15.80, -61.00, 16.60], - 'sainte-lucie' => [-61.10, 13.70, -60.80, 14.20], - 'barbade' => [-59.80, 13.00, -59.30, 13.40], - 'saint-martin' => [-63.20, 17.80, -62.90, 18.20], + 'guadeloupe' => [-62.50, 15.70, -58.50, 17.00], ]; public function __construct(private IngestionService $ingestionService) diff --git a/backend/src/Controller/SpotScoreController.php b/backend/src/Controller/SpotScoreController.php index 8ba6982..334de45 100644 --- a/backend/src/Controller/SpotScoreController.php +++ b/backend/src/Controller/SpotScoreController.php @@ -29,7 +29,8 @@ class SpotScoreController extends AbstractController * * Cache HTTP 30 min (scores mis à jour au max 1-2×/jour par ingestion). */ - #[Route('/overview', name: 'overview', methods: ['GET'])] + // priority: 10 — empêche API Platform GET /api/spots/{id} de capturer /overview + #[Route('/overview', name: 'overview', methods: ['GET'], priority: 10)] public function overview(): JsonResponse { $rows = $this->connection->fetchAllAssociative( @@ -51,6 +52,7 @@ class SpotScoreController extends AbstractController ORDER BY timestamp DESC LIMIT 1 ) ist ON true + WHERE cp.region = 'Guadeloupe' ORDER BY cp.name" ); diff --git a/backend/src/MessageHandler/IngestionScheduleHandler.php b/backend/src/MessageHandler/IngestionScheduleHandler.php index 7440c2a..2a164ba 100644 --- a/backend/src/MessageHandler/IngestionScheduleHandler.php +++ b/backend/src/MessageHandler/IngestionScheduleHandler.php @@ -22,13 +22,11 @@ use Symfony\Component\Process\Process; #[AsMessageHandler] final class IngestionScheduleHandler { - // Zones d'intérêt — même liste que IngestSentinelCommand + // Zone d'ingestion : archipel guadeloupéen (Grande-Terre, Basse-Terre, + // Marie-Galante, Les Saintes, La Désirade) + ~350 km d'océan à l'est + // pour détecter les sargasses en approche bien avant qu'elles touchent terre. private const ZONES = [ - 'martinique' => [-61.30, 14.30, -60.70, 14.90], - 'guadeloupe' => [-61.90, 15.80, -61.00, 16.60], - 'sainte-lucie' => [-61.10, 13.70, -60.80, 14.20], - 'barbade' => [-59.80, 13.00, -59.30, 13.40], - 'saint-martin' => [-63.20, 17.80, -62.90, 18.20], + 'guadeloupe' => [-62.50, 15.70, -58.50, 17.00], ]; public function __construct( diff --git a/docs/screen.png b/docs/screen.png deleted file mode 100644 index 04a5017..0000000 Binary files a/docs/screen.png and /dev/null differ diff --git a/docs/screen2.png b/docs/screen2.png deleted file mode 100644 index 6bdbcc5..0000000 Binary files a/docs/screen2.png and /dev/null differ diff --git a/docs/screenSargasses.png b/docs/screenSargasses.png new file mode 100644 index 0000000..a29eae4 Binary files /dev/null and b/docs/screenSargasses.png differ diff --git a/frontend/src/components/Map/SargassesMap.jsx b/frontend/src/components/Map/SargassesMap.jsx index 8b6514c..566685c 100644 --- a/frontend/src/components/Map/SargassesMap.jsx +++ b/frontend/src/components/Map/SargassesMap.jsx @@ -4,7 +4,10 @@ import 'maplibre-gl/dist/maplibre-gl.css'; import { api } from '../../api/client'; import './SargassesMap.css'; -const INITIAL_VIEW = { longitude: -61.55, latitude: 16.25, zoom: 9 }; +// Vue initiale : archipel guadeloupéen (Les Saintes → La Désirade → Basse-Terre) +const INITIAL_VIEW = { longitude: -61.35, latitude: 16.2, zoom: 9 }; +// Limites souples : ~350 km à l'est pour voir les trajectoires approchantes +const MAX_BOUNDS = [[-63.5, 13.0], [-57.5, 18.5]]; const FALLBACK_STYLE = 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json'; // ── Cartoon style transformer ────────────────────────────────────────────── @@ -267,6 +270,7 @@ export default function SargassesMap({ onSpotSelect, selectedSpotId, activeStep, onMove={e => setViewState(e.viewState)} onClick={() => onSpotSelect(null)} mapStyle={mapStyle} + maxBounds={MAX_BOUNDS} style={{ width: '100%', height: '100vh' }} >