[Mapbender-commits] r9782 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Sep 29 02:57:40 PDT 2017


Author: armin11
Date: 2017-09-29 02:57:40 -0700 (Fri, 29 Sep 2017)
New Revision: 9782

Modified:
   trunk/mapbender/http/classes/class_wfs_2_0_factory.php
Log:
Extract wfs 2.0 output formats

Modified: trunk/mapbender/http/classes/class_wfs_2_0_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs_2_0_factory.php	2017-09-27 11:59:07 UTC (rev 9781)
+++ trunk/mapbender/http/classes/class_wfs_2_0_factory.php	2017-09-29 09:57:40 UTC (rev 9782)
@@ -411,6 +411,9 @@
 				$myWfs->getFeature =  html_entity_decode($this->getValue($xpath, '/wfs:WFS_Capabilities/ows:OperationsMetadata/ows:Operation[@name="GetFeature"]/ows:DCP/ows:HTTP/ows:Post/@xlink:href', $wfs20Cap));
 
 				$myWfs->transaction =  html_entity_decode($this->getValue($xpath, '/wfs:WFS_Capabilities/ows:OperationsMetadata/ows:Operation[@name="Transaction"]/ows:DCP/ows:HTTP/ows:Post/@xlink:href', $wfs20Cap));
+//get supported formats [mimetypes]
+				$myWfs->wfsOutputFormatArray = html_entity_decode($this->getValue($xpath, '/wfs:WFS_Capabilities/ows:OperationsMetadata/ows:Parameter[@name="outputFormat"]/ows:AllowedValues/ows:Value', $wfs20Cap));
+				//$wfs11Cap->xpath('/wfs:WFS_Capabilities/ows:OperationsMetadata/ows:Operation[@name="GetFeature"]/ows:Parameter[@name="outputFormat"]/ows:Value');
 
 				//get list of featuretypes
 				$capFeatureTypes = $xpath->query('/wfs:WFS_Capabilities/wfs:FeatureTypeList/wfs:FeatureType', $wfs20Cap);
@@ -427,6 +430,12 @@
 						$e = new mb_notice("other crs: ".$crs);
 						$featuretype_crsArray[] = $crs;
 					}
+					$featuretypeOutputFormats = array();
+					$outputFormats = $featureType->OutputFormats->Format;
+					foreach ($outputFormats as $outputFormat) {
+						$featuretypeOutputFormats[] = $outputFormat;
+						$e = new mb_exception("class_wfs_2_0_factory.php: add outputFormat for WFS: ".$outputFormat);
+					}
 					//<wfs:MetadataURL type="FGDC" format="text/xml">http://www.ogccatservice.com/csw.cgi?service=CSW&version=2.0.0&request=GetRecords&constraintlanguage=CQL&constraint="recordid=urn:uuid:4ee8b2d3-9409-4a1d-b26b-6782e4fa3d59"</wfs:MetadataURL>
 					$metadataURLArray = $xpath->query('./wfs:MetadataURL', $featureType);
 					$featuretype_metadataUrl = array();
@@ -463,6 +472,7 @@
 							$currentFeatureType->latLonBboxArray['maxx'] = $featuretype_latlon_maxx;
 							$currentFeatureType->latLonBboxArray['maxy'] = $featuretype_latlon_maxy;
 							$currentFeatureType->crsArray = $featuretype_crsArray;
+							$currentFeatureType->featuretypeOutputFormatArray = $featuretypeOutputFormats;
 							$currentFeatureType->metadataUrlArray = $featuretype_metadataUrl;
 							$myWfs->addFeatureType($currentFeatureType);
 						}



More information about the Mapbender_commits mailing list