[Mapbender-commits] r8446 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Jul 10 07:07:51 PDT 2012
Author: armin11
Date: 2012-07-10 07:07:51 -0700 (Tue, 10 Jul 2012)
New Revision: 8446
Modified:
trunk/mapbender/http/php/mod_inspireDownloadFeed.php
Log:
Bugfix for INSPIRE predefined dataset: Don't use WFS 1.0.0 to generate feed, cause reslutType=hits is not supported.
Modified: trunk/mapbender/http/php/mod_inspireDownloadFeed.php
===================================================================
--- trunk/mapbender/http/php/mod_inspireDownloadFeed.php 2012-07-09 15:31:31 UTC (rev 8445)
+++ trunk/mapbender/http/php/mod_inspireDownloadFeed.php 2012-07-10 14:07:51 UTC (rev 8446)
@@ -269,6 +269,9 @@
return "<error>The metadataset with id ".$mapbenderMetadata[$m]->metadata_id." has no coupled ".$generateFrom." ressource ".$m."</error>";
}
$crs = $mapbenderMetadata[$m]->metadata_ref_system;
+ if (!isset($mapbenderMetadata[$m]->metadata_ref_system) || $mapbenderMetadata[$m]->metadata_ref_system == '') {
+ return "<error>For the metadataset with id ".$mapbenderMetadata[$m]->metadata_id." is no reference system defined!</error>";
+ }
$epsgId = explode(':',$crs);
//infos about the registrating department, check first if a special metadata point of contact is defined in the service table - function from mod_showMetadata - TODO: should be defined in admin class
@@ -586,7 +589,12 @@
//For each featuretype which was found! Maybe more than one!
for ($i = 0; $i < $countRessource; $i++) {
$crs = $mapbenderMetadata[$i]->metadata_ref_system;
+ $e = new mb_notice("Ref system of featuretype ".$mapbenderMetadata[$i]->featuretype_name." : ".$crs);
$epsgId = explode(':',$crs);
+ $e = new mb_notice("Epsg id of featuretype ".$mapbenderMetadata[$i]->featuretype_name." : ".$epsgId[1]);
+ if (!($mapbenderMetadata[$i]->wfs_version) || $mapbenderMetadata[$i]->wfs_version == '' || $mapbenderMetadata[$i]->wfs_version == '1.0.0') {
+ return "<error>Version of WFS : ".$mapbenderMetadata[$i]->wfs_version." is not supported to generate inspire download services for predefined datasets!</error>";
+ }
//define request to get number of hits per featuretype
$gHLink = $mapbenderMetadata[$i]->wfs_getfeature."SERVICE=WFS&REQUEST=GetFeature&VERSION=";
$gHLink .= $mapbenderMetadata[$i]->wfs_version."&typeName=";
@@ -595,6 +603,7 @@
$startRequestTime = time();
$hitConnector = new connector($gHLink);
$hitXml = $hitConnector->file;
+ $e = new mb_exception($gHLink);
$endRequestTime = time();
$diffTime = $endRequestTime-$startRequestTime;
$e = new mb_exception("Time for counting objects of featuretype ".$mapbenderMetadata[$i]->featuretype_name." : ".$diffTime." seconds!");
@@ -642,8 +651,8 @@
$diffX = $maxx - $minx; //in m - depends on given epsg code
$diffY = $maxy - $miny; //in m
- $e = new mb_exception($diffX);
- $e = new mb_exception($diffY);
+ $e = new mb_notice($diffX);
+ $e = new mb_notice($diffY);
$width = ceil(sqrt(($diffX * $diffY) / $countTiles));
$e = new mb_exception($width);
@@ -720,7 +729,7 @@
$numberOfEntries = count($mapbenderMetadata);
}
}
-
+ $e = new mb_exception("Count of bboxes: ".$numberOfEntries);
for ($i = 0; $i < $numberOfEntries; $i++) {
//<entry> 5.1.12 / 5.2.3
$feedEntry = $feedDoc->createElement("entry");
More information about the Mapbender_commits
mailing list