Skip to content

Commit 5b3d6bf

Browse files
authored
Merge pull request #50 from rok4/develop
Release 6.1.3
2 parents bc95120 + 76213a4 commit 5b3d6bf

File tree

5 files changed

+32
-16
lines changed

5 files changed

+32
-16
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 6.1.3
2+
3+
### [Fixed]
4+
5+
* `WMTS` :
6+
* correction du calcul des tuiles limites pour le TMS natif lorsque les limites de la couche sont surchargées par une bbox
7+
* pour que la couche apparaisse dans les capacités Inspire, le format de la tuile doit être le PNG
8+
* dans les capacités inspire, `inspire_vs:ExtendedCapabilities` doit être dans `OperationsMetadata`
9+
* `WMS`
10+
* Ajout des schémas XML dans les réponses en erreur
11+
112
## 6.1.2
213

314
### [Added]

src/Inspire.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ bool is_inspire_wmts ( Layer* layer ) {
147147
return false;
148148
}
149149

150+
if (Rok4Format::to_mime_type ( layer->get_pyramid()->get_format() ) != "image/png") {
151+
BOOST_LOG_TRIVIAL(debug) << "Non conforme INSPIRE WMTS (" << layer->get_id() << ") : données pas en png" ;
152+
return false;
153+
}
154+
150155
// Pour être inspire, le style par défaut doit avoir le bon identifiant
151156
if (layer->get_default_style()->get_identifier() != "inspire_common:DEFAULT") {
152157
BOOST_LOG_TRIVIAL(debug) << "Non conforme INSPIRE WMTS (" << layer->get_id() << ") : style par défaut != inspire_common:DEFAULT" ;

src/configurations/Layer.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -217,20 +217,6 @@ bool Layer::parse(json11::Json& doc, ServicesConfiguration* services) {
217217
return false;
218218
}
219219

220-
// On a forcément le TMS natif de la donnée pour le WMTS
221-
TileMatrixSetInfos* infos_tms_natif = new TileMatrixSetInfos(pyramid->get_tms());
222-
223-
infos_tms_natif->set_bottom_top(pyramid->get_lowest_level()->get_id(), pyramid->get_highest_level()->get_id());
224-
225-
for (Level* l : pyramid->get_ordered_levels(false)) {
226-
infos_tms_natif->limits.push_back(l->get_tile_limits());
227-
}
228-
229-
available_tilematrixsets.push_back(infos_tms_natif);
230-
231-
// On a forcément le CRS natif de la donnée pour le WMS
232-
available_crss.push_back ( pyramid->get_tms()->get_crs() );
233-
234220
/********************** Gestion de l'étendue des données */
235221

236222
if (doc["bbox"].is_object()) {
@@ -255,6 +241,20 @@ bool Layer::parse(json11::Json& doc, ServicesConfiguration* services) {
255241
calculate_bboxes();
256242
}
257243

244+
// On a forcément le TMS natif de la donnée pour le WMTS
245+
TileMatrixSetInfos* infos_tms_natif = new TileMatrixSetInfos(pyramid->get_tms());
246+
247+
infos_tms_natif->set_bottom_top(pyramid->get_lowest_level()->get_id(), pyramid->get_highest_level()->get_id());
248+
249+
for (Level* l : pyramid->get_ordered_levels(false)) {
250+
infos_tms_natif->limits.push_back(l->get_tile_limits());
251+
}
252+
253+
available_tilematrixsets.push_back(infos_tms_natif);
254+
255+
// On a forcément le CRS natif de la donnée pour le WMS
256+
available_crss.push_back ( pyramid->get_tms()->get_crs() );
257+
258258

259259
// Services autorisés a priori
260260
if (doc["wms"].is_object() && doc["wms"]["enabled"].is_bool()) {

src/services/wms/Exception.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
#include "services/wms/Exception.h"
4747

48-
std::string WmsException::xml_template = "<ServiceExceptionReport><ServiceException code=\"%s\">%s</ServiceException></ServiceExceptionReport>";
48+
std::string WmsException::xml_template = "<ServiceExceptionReport version=\"1.3.0\" xmlns=\"http://www.opengis.net/ogc\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd\"><ServiceException code=\"%s\">%s</ServiceException></ServiceExceptionReport>";
4949

5050
MessageDataStream* WmsException::get_error_message(std::string reason, std::string code, int status) {
5151
return new MessageDataStream(str(boost::format(xml_template) % code % reason), "text/xml", status);

src/services/wmts/getcapabilities.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ DataStream* WmtsService::get_capabilities ( Request* req, Rok4Server* serv ) {
134134
op_getfeatureinfo.add("ows:DCP.ows:HTTP.ows:Get.ows:Constraint.ows:AllowedValues.ows:Value", "KVP");
135135

136136
if (req->is_inspire(default_inspire)) {
137-
ptree& inspire_extension = root.add("inspire_vs:ExtendedCapabilities", "");
137+
ptree& inspire_extension = root.add("ows:OperationsMetadata.inspire_vs:ExtendedCapabilities", "");
138138

139139
if (metadata) {
140140
inspire_extension.add("inspire_common:MetadataUrl.inspire_common:URL", metadata->get_href());

0 commit comments

Comments
 (0)