From dac689b50277bb1defd760d001710f8ca71bc6ba 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 81cf5368..c59d6cd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ Le format est basé sur [Keep a Changelog](https://keepachangelog.com/) et ce pr ## [Unreleased] +### 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);