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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Aug 17 00:00:45 PDT 2012


Author: armin11
Date: 2012-08-17 00:00:44 -0700 (Fri, 17 Aug 2012)
New Revision: 8457

Modified:
   trunk/mapbender/http/classes/class_wfsToDb.php
   trunk/mapbender/http/classes/class_wfs_factory.php
   trunk/mapbender/http/plugins/mb_metadata_edit.php
   trunk/mapbender/http/plugins/mb_metadata_server.php
   trunk/mapbender/http/plugins/mb_metadata_wfs_edit.php
   trunk/mapbender/http/plugins/mb_metadata_wfs_server.php
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.3_to_2.7.4_pgsql_UTF-8.sql
Log:
Extent mapbender to store and handle wfs max_features and wms max_imagesize values. This is needed for printing and INSPIRE download services for predefined datasets.

Modified: trunk/mapbender/http/classes/class_wfsToDb.php
===================================================================
--- trunk/mapbender/http/classes/class_wfsToDb.php	2012-08-16 13:41:47 UTC (rev 8456)
+++ trunk/mapbender/http/classes/class_wfsToDb.php	2012-08-17 07:00:44 UTC (rev 8457)
@@ -132,7 +132,7 @@
 		$sql .= "city = $16, deliverypoint = $17, administrativearea = $18, ";
 		$sql .= "postalcode = $19, voice = $20, facsimile = $21, ";
 		$sql .= "electronicmailaddress = $22, country = $23, ";
-		$sql .= "wfs_timestamp = $24, wfs_network_access = $25, fkey_mb_group_id = $26 ";
+		$sql .= "wfs_timestamp = $24, wfs_network_access = $25, fkey_mb_group_id = $26, wfs_max_features = $28";
 		$sql .= "WHERE wfs_id = $27";
 
 		$v = array(
@@ -160,12 +160,13 @@
 			$aWfs->electronicMailAddress,
 			$aWfs->country, 
 			strtotime("now"),
-			$aWfs->network_access,
+			$aWfs->wfs_network_access,
 			$aWfs->fkey_mb_group_id,
-			$aWfs->id
+			$aWfs->id,
+			$aWfs->wfs_max_features
 		);
 			
-		$t = array('s', 's', 's', 's', 's', 's', 's', 's' ,'s' ,'s' ,'s' ,'s','s' ,'s','s','s','s','s','s','s','s','s','s','i','i','i','i');
+		$t = array('s', 's', 's', 's', 's', 's', 's', 's' ,'s' ,'s' ,'s' ,'s','s' ,'s','s','s','s','s','s','s','s','s','s','i','i','i','i','i');
 		$e = new mb_notice("UPDATING WFS " . $aWfs->id);
 		$res = db_prep_query($sql, $v, $t);
 		if (!$res) {

Modified: trunk/mapbender/http/classes/class_wfs_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs_factory.php	2012-08-16 13:41:47 UTC (rev 8456)
+++ trunk/mapbender/http/classes/class_wfs_factory.php	2012-08-17 07:00:44 UTC (rev 8457)
@@ -109,6 +109,7 @@
 			$aWfs->timestamp = db_result($res, $cnt, "wfs_timestamp");
 			$aWfs->timestamp_create = db_result($res, $cnt, "wfs_timestamp_create");
 			$aWfs->network_access = db_result($res, $cnt, "wfs_network_access");
+			$aWfs->wfs_max_features = db_result($res, $cnt, "wfs_max_features");
 			$aWfs->fkey_mb_group_id = db_result($res, $cnt, "fkey_mb_group_id");
 			$aWfs->uuid = db_result($res, $cnt, "uuid");
 			// Featuretypes

Modified: trunk/mapbender/http/plugins/mb_metadata_edit.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_edit.php	2012-08-16 13:41:47 UTC (rev 8456)
+++ trunk/mapbender/http/plugins/mb_metadata_edit.php	2012-08-17 07:00:44 UTC (rev 8457)
@@ -62,6 +62,11 @@
 		<label for="wms_network_access"><?php echo _mb("Restricted Network Access (Registry)");?>:</label>
       		<input name="wms_network_access" id="wms_network_access" type="checkbox"/>
 	</p>
+	<p>
+		<label for="wms_max_imagesize"><?php echo _mb("Maximal amount of pixels (Registry)");?>:</label>
+      		<input name="wms_max_imagesize" id="wms_max_imagesize" type="text"/>
+		<img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("The amount of pixels is related to 1 dimension. It is asumed, that the image is square! If your server may serve a picture size of 2000x1000px please set this value to 1000. This value is needed to print bigger maps and allow INSPIRE download services of predefined datasets. If no value is given, the portal asumes a minimum of 1000px!");?>'}" src="../img/questionmark.png" alt="" />
+	</p>
 </fieldset>
 <fieldset>
 	<legend><?php echo _mb("WMS Provider Section (OWS)");?></legend>

Modified: trunk/mapbender/http/plugins/mb_metadata_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_server.php	2012-08-16 13:41:47 UTC (rev 8456)
+++ trunk/mapbender/http/plugins/mb_metadata_server.php	2012-08-17 07:00:44 UTC (rev 8457)
@@ -100,6 +100,7 @@
 			"wms_timestamp", 
 			"wms_timestamp_create",
 			"wms_network_access",
+			"wms_max_imagesize",
 			"fkey_mb_group_id"
 		);
 
@@ -446,6 +447,7 @@
 			"contactelectronicmailaddress",
 			"wms_termsofuse",
 			"wms_network_access",
+			"wms_max_imagesize",
 			"fkey_mb_group_id"
 		);
 		foreach ($columns as $c) {

Modified: trunk/mapbender/http/plugins/mb_metadata_wfs_edit.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_wfs_edit.php	2012-08-16 13:41:47 UTC (rev 8456)
+++ trunk/mapbender/http/plugins/mb_metadata_wfs_edit.php	2012-08-17 07:00:44 UTC (rev 8457)
@@ -58,9 +58,14 @@
     	<img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("Selection of predefined licences.");?>'}" src="../img/questionmark.png" alt="" />
 	</p>
 	<p>
-	  	<label for="network_access"><?php echo _mb("Restricted Network Access (Registry)");?>:</label>
-      		<input name="network_access" id="network_access" type="checkbox"/>
+	  	<label for="wfs_network_access"><?php echo _mb("Restricted Network Access (Registry)");?>:</label>
+      		<input name="wfs_network_access" id="wfs_network_access" type="checkbox"/>
 	</p>
+	<p>
+		<label for="wfs_max_features"><?php echo _mb("Maximal amount of features served (Registry)");?>:</label>
+      		<input name="wfs_max_features" id="wfs_max_features" type="text"/>
+		<img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("The amount of features is normally a restriction which is defined in the WFS itself. Cause the value is not part of the ows capabilities, there is a need to store it somewhere else. The default value is 1000. This is a value that may be handled without performance restrictions. If your server has been configured with another value, please alter the default here.");?>'}" src="../img/questionmark.png" alt="" />
+	</p>
 </fieldset>
 <fieldset>
 	<legend><?php echo _mb("WFS Provider Section (OWS)");?></legend>

Modified: trunk/mapbender/http/plugins/mb_metadata_wfs_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_wfs_server.php	2012-08-16 13:41:47 UTC (rev 8456)
+++ trunk/mapbender/http/plugins/mb_metadata_wfs_server.php	2012-08-17 07:00:44 UTC (rev 8457)
@@ -80,7 +80,7 @@
 individualname, positionname, providername, voice, 
 facsimile, deliverypoint, city, 
 administrativearea, postalcode, country, electronicmailaddress,
-wfs_timestamp, wfs_timestamp_create, wfs_network_access, fkey_mb_group_id 
+wfs_timestamp, wfs_timestamp_create, wfs_network_access, fkey_mb_group_id, wfs_max_features 
 FROM wfs WHERE wfs_id = $wfsId;
 
 SQL;
@@ -107,7 +107,8 @@
 		$resultObj['electronicMailAddress'] = $row['electronicmailaddress'];
 		$resultObj['timestamp'] = $row['wfs_timestamp'] != "" ? date('d.m.Y', $row['wfs_timestamp']) : "";
 		$resultObj['timestamp_create'] = $row['wfs_timestamp_create'] != "" ? date('d.m.Y', $row['wfs_timestamp_create']) : "";
-		$resultObj['network_access'] = $row['wfs_network_access'];
+		$resultObj['wfs_network_access'] = $row['wfs_network_access'];
+		$resultObj['wfs_max_features'] = $row['wfs_max_features'];
 		$resultObj['fkey_mb_group_id'] = $row['fkey_mb_group_id'];
 
 		$keywordSql = <<<SQL
@@ -794,7 +795,8 @@
 			"wfs_termsofuse",
 			"timestamp",
 			"timestamp_create",
-			"network_access",
+			"wfs_network_access",
+			"wfs_max_features",
 			"fkey_mb_group_id",
 			"uuid"
 		);
@@ -896,10 +898,10 @@
 				}
 			}
 		}
-		if ($wfs->network_access == "on") {
-			$wfs->network_access = intval('1');
+		if ($wfs->wfs_network_access == "on") {
+			$wfs->wfs_network_access = intval('1');
 		} else {
-			$wfs->network_access = intval('0');
+			$wfs->wfs_network_access = intval('0');
 		}
 		$wfs->update(true); //parameter for metadata only update - some things are not pulled when creating object from database and some things need not to be updated.
 

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:41:47 UTC (rev 8456)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.3_to_2.7.4_pgsql_UTF-8.sql	2012-08-17 07:00:44 UTC (rev 8457)
@@ -1,3 +1,3 @@
 -- new file for db changes to 2.7.4
-ALTER TABLE wms ADD COLUMN wms_max_imagesize INTEGER DEFAULT 0;
-ALTER TABLE wfs ADD COLUMN wfs_max_features INTEGER DEFAULT 0;
+ALTER TABLE wms ADD COLUMN wms_max_imagesize INTEGER DEFAULT 1000;
+ALTER TABLE wfs ADD COLUMN wfs_max_features INTEGER DEFAULT 1000;



More information about the Mapbender_commits mailing list