[Mapbender-commits] r9324 - in trunk/mapbender/http: classes php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Dec 1 04:05:54 PST 2015


Author: armin11
Date: 2015-12-01 04:05:54 -0800 (Tue, 01 Dec 2015)
New Revision: 9324

Modified:
   trunk/mapbender/http/classes/class_iso19139.php
   trunk/mapbender/http/php/mod_inspireDownloadFeed.php
Log:
Bugfix for calculating bboxes

Modified: trunk/mapbender/http/classes/class_iso19139.php
===================================================================
--- trunk/mapbender/http/classes/class_iso19139.php	2015-12-01 10:47:12 UTC (rev 9323)
+++ trunk/mapbender/http/classes/class_iso19139.php	2015-12-01 12:05:54 UTC (rev 9324)
@@ -1785,7 +1785,7 @@
 			$this->fees,
 			$this->licenseSourceNote
 		);
-		$e = new mb_exception("class_iso19139: ".$this->createWktBboxFromArray($this->wgs84Bbox));
+		//$e = new mb_exception("class_iso19139: ".$this->createWktBboxFromArray($this->wgs84Bbox));
 		$t = array('s','s','s','s','s','s','s','s','s','s','s','s','s','b','s','s','s','s','i','i','s','s','b','s','s','s','s','s','s','POLYGON','s','s','s','i','POLYGON','d','s','s');
 		$res = db_prep_query($sql,$v,$t);
 		return $res;

Modified: trunk/mapbender/http/php/mod_inspireDownloadFeed.php
===================================================================
--- trunk/mapbender/http/php/mod_inspireDownloadFeed.php	2015-12-01 10:47:12 UTC (rev 9323)
+++ trunk/mapbender/http/php/mod_inspireDownloadFeed.php	2015-12-01 12:05:54 UTC (rev 9324)
@@ -1308,6 +1308,7 @@
 					$bboxFilter = '<Filter xmlns:gml="http://www.opengis.net/gml"><BBOX>';
 					//$bboxFilter .= '<gml:Box srsName="EPSG:'.$epsgId[1].'"';
 					$bboxFilter .= '<ogc:PropertyName>the_geom</ogc:PropertyName>';//TODO parse DescribeFeatureType for geom property
+					
 					$bboxFilter .= '<gml:Box>';
 					$bboxFilter .= '<gml:coordinates>';
 					$currentBbox = explode(',',$bboxWfs[$mapbenderMetadata[$i]->featuretype_name][$l]);
@@ -1685,8 +1686,7 @@
 function parseBox2d($box2d) {
 	//"BOX(6.9213399887085 50.1331939697266,6.93241024017334 50.138801574707)"
 	//delete BOX( and ), replace , with blank
-	//new 20151201 - use xmin not bbox2d from postgis!!!
-	//$bbox = str_replace(","," ",str_replace(")","",str_replace("BOX(", "", $box2d)));
+	$bbox = str_replace(","," ",str_replace(")","",str_replace("BOX(", "", $box2d)));
 	//explode with blank
 	$bbox = explode(" ",$bbox);
 	return $bbox;
@@ -1734,11 +1734,8 @@
 		//to generate an atom feed from mb_metadata there must be some information avaiable, that is normally used from service metadata
 		//owner, group, bbox, ... - the mb_metadata table have to be filled with the geometry from the layer/featuretype - of which it has been coupled with
 		$mapbenderMetadata[$indexMapbenderMetadata]->origin = $row['origin']; 
-		$e = new mb_exception($row['origin']);
 		if (isset($row['bbox2d']) && $row['bbox2d'] != '') {
 				$bbox = $row['bbox2d'];
-				//$bbox = str_replace(' ',',',str_replace(')','',str_replace('BOX(','',$row['bbox2d'])));
-				//$e = new mb_exception("class_iso19139.php: got bbox for metadata: ".$bbox);
 				$mapbenderMetadata[$indexMapbenderMetadata]->latlonbbox = explode(',',$bbox);
 				$mapbenderMetadata[$indexMapbenderMetadata]->minx = $mapbenderMetadata[$indexMapbenderMetadata]->latlonbbox[0];
 				$mapbenderMetadata[$indexMapbenderMetadata]->miny = $mapbenderMetadata[$indexMapbenderMetadata]->latlonbbox[1];
@@ -1846,7 +1843,7 @@
 				}
 				//overwrite mapbenderMetadata->minx ... which came from layer/featuretype metadata with bbox of metadata itself, if given
 				if (isset($mapbenderMetadata[$indexMapbenderMetadata]->metadata_bbox) && $mapbenderMetadata[$indexMapbenderMetadata]->metadata_bbox !== "") {
-					$bbox = parseBox2d($mapbenderMetadata[$indexMapbenderMetadata]->metadata_bbox);
+					$bbox = explode(",", $mapbenderMetadata[$indexMapbenderMetadata]->metadata_bbox);
 					$mapbenderMetadata[$indexMapbenderMetadata]->minx = $bbox[0];
 					$mapbenderMetadata[$indexMapbenderMetadata]->miny = $bbox[1];
 					$mapbenderMetadata[$indexMapbenderMetadata]->maxx = $bbox[2];



More information about the Mapbender_commits mailing list