[Mapbender-commits] r8456 - in trunk/mapbender: http/classes http/plugins resources/db/pgsql/UTF-8/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Aug 16 06:41:48 PDT 2012


Author: armin11
Date: 2012-08-16 06:41:47 -0700 (Thu, 16 Aug 2012)
New Revision: 8456

Modified:
   trunk/mapbender/http/classes/class_wms.php
   trunk/mapbender/http/plugins/mb_metadata_server.php
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.3_to_2.7.4_pgsql_UTF-8.sql
Log:
Extent information model for max features (wfs) and max imagesize (wms)

Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php	2012-08-16 13:02:24 UTC (rev 8455)
+++ trunk/mapbender/http/classes/class_wms.php	2012-08-16 13:41:47 UTC (rev 8456)
@@ -47,6 +47,8 @@
 	var $contactvoicetelephone;
 	var $contactfacsimiletelephone;
 	var $contactelectronicmailaddress;
+	//The following attribute is not part of the wms spec, but usefull if someone want to print or give back referenced data via wms - e.g. inspire download services for predefined datasets
+	var $wms_max_pixelsize;
 	  
 	var $wms_keyword = array();
 	var $data_type = array(); 
@@ -553,7 +555,7 @@
 		
 		$this->wms_getfeatureinfo = "";
 		$this->gui_wms_featureinfoformat = "";
-
+		$this->wms_max_imagesize = 0;
 		foreach ($values as $element) {
 			if(mb_strtoupper($element[tag]) == "WMT_MS_CAPABILITIES" && $element[type] == "open"){
 				$this->wms_version = $element[attributes][version];
@@ -2493,6 +2495,7 @@
 		$sql .= "wms_userstyle = $11, ";
 		$sql .= "wms_remotewfs = $12, ";
 		$sql .= "wms_network_access = $13, ";
+		$sql .= "wms_max_imagesize = $17, ";
 		$sql .= "fkey_mb_group_id = $14, ";
 		$sql .= "uuid = $15 ";
 		$sql .= " WHERE wms_id = $16";
@@ -2500,8 +2503,8 @@
 		$v = array($this->wms_version,$this->wms_getcapabilities,
 			$this->wms_getmap,$this->wms_getfeatureinfo,$this->wms_getlegendurl,
 			$admin->char_encode($this->wms_getcapabilities_doc),$this->wms_upload_url,strtotime("now"),
-			$this->wms_supportsld,$this->wms_userlayer,$this->wms_userstyle,$this->wms_remotewfs,$this->wms_network_access, $this->fkey_mb_group_id ,$this->uuid ,$myWMS);
-		$t = array('s','s','s','s','s','s','s','i','s','s','s','s','i','i','s','i');
+			$this->wms_supportsld,$this->wms_userlayer,$this->wms_userstyle,$this->wms_remotewfs,$this->wms_network_access, $this->fkey_mb_group_id ,$this->uuid ,$myWMS, $this->wms_max_imagesize);
+		$t = array('s','s','s','s','s','s','s','i','s','s','s','s','i','i','s','i','i');
 			
 		$res = db_prep_query($sql,$v,$t);
 		if(!$res){
@@ -2526,14 +2529,15 @@
 			$sql .= "contactfacsimiletelephone = $14, ";
 			$sql .= "contactelectronicmailaddress = $15, ";
 			$sql .= "wms_network_access = $16, ";
+			$sql .= "wms_max_imagesize = $20, ";
 			$sql .= "fkey_mb_group_id = $17, ";
 			$sql .= "uuid = $18 ";
 			$sql .= " WHERE wms_id = $19";
 			$v = array($this->wms_title,$this->wms_abstract,$this->fees,$this->accessconstraints,
 				$this->contactperson,$this->contactposition,$this->contactorganization,$this->address,
 				$this->city,$this->stateorprovince,$this->postcode,$this->country,$this->contactvoicetelephone,
-				$this->contactfacsimiletelephone,$this->contactelectronicmailaddress,$this->wms_network_access, $this->fkey_mb_group_id ,$this->uuid, $myWMS);
-			$t = array('s','s','s','s','s','s','s','s','s','s','s','s','s','s','s','i','i','s','i');
+				$this->contactfacsimiletelephone,$this->contactelectronicmailaddress,$this->wms_network_access, $this->fkey_mb_group_id ,$this->uuid, $myWMS, $this->wms_max_imagesize);
+			$t = array('s','s','s','s','s','s','s','s','s','s','s','s','s','s','s','i','i','s','i','i');
 			$res = db_prep_query($sql,$v,$t);
 			if(!$res){
 				db_rollback();	
@@ -3000,6 +3004,7 @@
 				$this->postcode = $row2["postcode"];
 				$this->country = $row2["country"];
 				$this->contactelectronicmailaddress = $row2["contactelectronicmailaddress"];
+				$this->wms_max_imagesize = $row2["wms_max_imagesize"];
 				
 				$count_wms++;
 			}
@@ -3205,6 +3210,7 @@
 			$this->wms_network_access = $row2["wms_network_access"];
 			$this->fkey_mb_group_id = $row2["fkey_mb_group_id"];
 			$this->uuid = $row2["uuid"];
+			$this->wms_max_imagesize = $row2["wms_max_imagesize"];
 			
 			#some default
 			$this->gui_wms_visible = 1;

Modified: trunk/mapbender/http/plugins/mb_metadata_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_server.php	2012-08-16 13:02:24 UTC (rev 8455)
+++ trunk/mapbender/http/plugins/mb_metadata_server.php	2012-08-16 13:41:47 UTC (rev 8456)
@@ -699,7 +699,7 @@
 		$ajaxResponse->setResult($resultObj);
 		$ajaxResponse->setSuccess(true);
 		break;
-case "getInitialLayerMetadata" :
+	case "getInitialLayerMetadata" :
 		$layerId = $ajaxResponse->getParameter("layerId");
 		$metadataId = $ajaxResponse->getParameter("metadataId");
 		$sql = <<<SQL
@@ -829,7 +829,7 @@
 		} else {
 			$data->export2csw = 'f';
 		}
-		//consistance
+		//consistence
 		if ($data->inspire_top_consistence == "on") {
 			$data->inspire_top_consistence = 't';
 		} else {
@@ -921,7 +921,7 @@
 				abort($result['message']);
 			} else {
 				$e = new mb_notice("Metadata with id ".$randomid." stored from editor to db!");
-				$ajaxResponse->setMessage("Metadata object from editor inserted into md_metadata!");
+				$ajaxResponse->setMessage("Metadata with id ".$randomid." stored from editor to db!");
 				$ajaxResponse->setSuccess(true);
 			}
 		}		

Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.3_to_2.7.4_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.3_to_2.7.4_pgsql_UTF-8.sql	2012-08-16 13:02:24 UTC (rev 8455)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.3_to_2.7.4_pgsql_UTF-8.sql	2012-08-16 13:41:47 UTC (rev 8456)
@@ -1,3 +1,3 @@
 -- new file for db changes to 2.7.4
-ALTER TABLE wms ADD COLUMN wms_max_imagesize INTEGER;
-ALTER TABLE wfs ADD COLUMN wfs_max_features INTEGER;
+ALTER TABLE wms ADD COLUMN wms_max_imagesize INTEGER DEFAULT 0;
+ALTER TABLE wfs ADD COLUMN wfs_max_features INTEGER DEFAULT 0;



More information about the Mapbender_commits mailing list