focus: recentrer l'app sur l'archipel guadeloupéen uniquement

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gwadaking
2026-04-14 16:26:20 -04:00
parent fd476f50c2
commit 2db067023f
7 changed files with 16 additions and 14 deletions

View File

@@ -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)

View File

@@ -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"
);

View File

@@ -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(

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

BIN
docs/screenSargasses.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 966 KiB

View File

@@ -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' }}
>
<NavigationControl position="bottom-right" />