From 34abceba209aeae8d9d1b95d8fa2320295f0820b Mon Sep 17 00:00:00 2001 From: VincentMiras Date: Fri, 10 Apr 2026 16:50:08 +0200 Subject: [PATCH] fix(ogc) : IGNGPF-5480 Mise en place de valeur limite pour la boundingbox en wms-r --- CHANGELOG.md | 4 ++++ include/rok4/utils/BoundingBox.h | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 515fdb24..912e0b01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ Le format est basé sur [Keep a Changelog](https://keepachangelog.com/) et ce pr - Compilation des artefacts sous ubuntu 24.04 (compatible debian 13 / trixie) +### Fixed + +- `Boundingbox` : Mise en place de valeur maximale et minimale pour les bbox en wms-r. + ## [3.0.0] - 2026-03-12 ### Added diff --git a/include/rok4/utils/BoundingBox.h b/include/rok4/utils/BoundingBox.h index 435900ec..df03d873 100644 --- a/include/rok4/utils/BoundingBox.h +++ b/include/rok4/utils/BoundingBox.h @@ -409,10 +409,10 @@ class BoundingBox { if (geographical) { ptree& node = parent.add("EX_GeographicBoundingBox", ""); - node.add("westBoundLongitude", xmin); - node.add("eastBoundLongitude", xmax); - node.add("southBoundLatitude", ymin); - node.add("northBoundLatitude", ymax); + node.add("westBoundLongitude", std::max(xmin,-180.0)); + node.add("eastBoundLongitude", std::min(xmax,180.0)); + node.add("southBoundLatitude", std::max(ymin,-90.0)); + node.add("northBoundLatitude", std::min(ymax,90.0)); } else { ptree& node = parent.add("BoundingBox", ""); node.add(".CRS", crs);