[Mapbender-commits] r9779 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Sep 18 08:05:47 PDT 2017
Author: armin11
Date: 2017-09-18 08:05:47 -0700 (Mon, 18 Sep 2017)
New Revision: 9779
Modified:
trunk/mapbender/http/php/mod_inspireDownloadFeed.php
Log:
Fix axes order problem when generating download feeds in 4326, 4258, ...
Modified: trunk/mapbender/http/php/mod_inspireDownloadFeed.php
===================================================================
--- trunk/mapbender/http/php/mod_inspireDownloadFeed.php 2017-09-18 11:47:08 UTC (rev 9778)
+++ trunk/mapbender/http/php/mod_inspireDownloadFeed.php 2017-09-18 15:05:47 UTC (rev 9779)
@@ -1199,7 +1199,7 @@
//check if axis order should be changed
if (check_epsg_wms_13($epsgId)) {
//alter order of axis for 4326
- //$alterAxisOrder = true;
+ $alterAxisOrder = true;
} else {
$alterAxisOrder = false;
}
@@ -1568,7 +1568,9 @@
//exchange lon lat with lat long for georss
$newBox = explode(',',$furtherLinkBbox[$m]);
//georss needs latitude longitude
- $newBox = $newBox[1].",".$newBox[0].",".$newBox[3].",".$newBox[2];
+ if ($alterAxisOrder == true) {
+ $newBox = $newBox[1].",".$newBox[0].",".$newBox[3].",".$newBox[2];
+ }
//generate content link
$feedEntryLink = $feedDoc->createElement("link");
if ($numberOfTiles > 1) {
@@ -1616,6 +1618,10 @@
$furtherLinkTitle[$m] = $ressourceTitle." im CRS ".$mapbenderMetadata[$i]->metadata_ref_system." - ".$resourceFormat." - Teil ".$currentIndex." von ".count($getFeatureLink)."";//TODO: set right format for wfs version!
//$furtherLinkBbox[$m] = $featureTypeBbox[$m];
$furtherLinkBbox[$m] = $featureTypeBboxWGS84[$m];
+ $newBox = explode(',',$furtherLinkBbox[$m]);
+ if ($alterAxisOrder == true) {
+ $newBox = $newBox[1].",".$newBox[0].",".$newBox[3].",".$newBox[2];
+ }
//generate content links
$feedEntryLink = $feedDoc->createElement("link");
if (count($getFeatureLink) > 1) {
@@ -1627,7 +1633,7 @@
$feedEntryLink->setAttribute("type", $furtherLinkType[$m]);
$feedEntryLink->setAttribute("hreflang", "de");
$feedEntryLink->setAttribute("title", $furtherLinkTitle[$m]);
- $feedEntryLink->setAttribute("bbox", str_replace(","," ",$furtherLinkBbox[$m]));
+ $feedEntryLink->setAttribute("bbox", str_replace(","," ",$newBox));
$feedEntry->appendChild($feedEntryLink);
}
//} end of foreach output_format
More information about the Mapbender_commits
mailing list