diff --git a/CHANGELOG.md b/CHANGELOG.md index 81cf536..c59d6cd 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 435900e..df03d87 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);