[Mapbender-commits] r9102 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Oct 21 01:48:28 PDT 2014
Author: armin11
Date: 2014-10-21 01:48:28 -0700 (Tue, 21 Oct 2014)
New Revision: 9102
Modified:
trunk/mapbender/http/classes/class_iso19139.php
Log:
Bugfixes for managing polygons in class_iso19139 and metadata addon editor
Modified: trunk/mapbender/http/classes/class_iso19139.php
===================================================================
--- trunk/mapbender/http/classes/class_iso19139.php 2014-10-17 09:43:16 UTC (rev 9101)
+++ trunk/mapbender/http/classes/class_iso19139.php 2014-10-21 08:48:28 UTC (rev 9102)
@@ -110,7 +110,6 @@
$this->inspireWholeArea = 0;
$this->inspireActualCoverage = 0;
$this->inspireDownload = 0;
- $this->inspireDownload = 0;
$this->linkAlreadyInDB = false;
$this->fileIdentifierAlreadyInDB = false;
}
@@ -862,8 +861,7 @@
//store them in object
//$bbox = str_replace(' ',',',str_replace(')','',str_replace('BOX(','',$row['bbox2d'])));
//$e = new mb_exception("class_iso19139.php: got bbox for metadata: ".$bbox);
-
- //check if multisurface or simple polygon is given
+
$gml3FromPostgis = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>".$row['bounding_polygon'];
libxml_use_internal_errors(true);
try {
@@ -881,17 +879,24 @@
return false;
}
//if parsing was successful
+
if ($gml3 !== false) {
- //check count of polygons
+ $gml3->addAttribute('xmlns:xmlns:gml', 'http://www.opengis.net/gml');
+ $gml3->registerXPathNamespace("gml", "http://www.opengis.net/gml");
+ $gml3 = simplexml_load_string($gml3->asXML());
if ($gml3->xpath('//gml:MultiSurface')) {
+ $e = new mb_notice("class_Iso19139: MultiSurface found!");
$this->polygonalExtentExterior = array();
//count surfaceMembers
- $numberOfSurfaces = count($gml3->xpath('//gml:MultiSurface/gml:surfaceMember'));
+ $numberOfSurfaces = count($gml3->xpath('/gml:MultiSurface/gml:surfaceMember'));
+ $e = new mb_notice("class_Iso19139: number of polygons: ".$numberOfSurfaces);
for ($k = 0; $k < $numberOfSurfaces; $k++) {
$this->polygonalExtentExterior[] = $this->parsePolygon($gml3, '//gml:MultiSurface/gml:surfaceMember/');
}
} else {
+ $e = new mb_notice("class_Iso19139: no MultiSurface found!");
if($gml3->xpath('//gml:Polygon')) {
+ $e = new mb_notice("class_Iso19139: number of polygons: 1");
$this->polygonalExtentExterior = array();
$this->polygonalExtentExterior[0] = $this->parsePolygon($gml3, '/');
}
@@ -921,7 +926,7 @@
$this->harvestResult = $row['harvestresult'];//;0;
$this->harvestException = $row['harvestexception'];//"";
$this->lineage = $row['lineage'];//"";
- $this->inspireTopConsistence = $row['inspire_top_consistance'];//"f";
+ $this->inspireTopConsistence = $row['inspire_top_consistence'];//"f";
$this->spatialResType = $row['spatial_res_type'];//"";
$this->spatialResValue = $row['spatial_res_value'];//"";
$this->export2Csw = $row['export2csw'];//"t";
More information about the Mapbender_commits
mailing list