[Mapbender-commits] r4653 - branches/2.6/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Sep 17 13:11:19 EDT 2009
Author: christoph
Date: 2009-09-17 13:11:19 -0400 (Thu, 17 Sep 2009)
New Revision: 4653
Modified:
branches/2.6/http/classes/class_gml_3_factory.php
Log:
Modified: branches/2.6/http/classes/class_gml_3_factory.php
===================================================================
--- branches/2.6/http/classes/class_gml_3_factory.php 2009-09-17 17:04:15 UTC (rev 4652)
+++ branches/2.6/http/classes/class_gml_3_factory.php 2009-09-17 17:11:19 UTC (rev 4653)
@@ -151,6 +151,36 @@
$simpleXMLNode->registerXPathNamespace('gml', 'http://www.opengis.net/gml');
+ $allCoords = $simpleXMLNode->xpath("gml:lineStringMember/gml:LineString/gml:coordinates");
+
+ $cnt=0;
+ foreach ($allCoords as $Coords) {
+
+ $gmlMultiLine->lineArray[$cnt] = array();
+
+ $coordsDom = dom_import_simplexml($Coords);
+
+// $name = $coordsDom->nodeName;
+// $value = $coordsDom->nodeValue;
+// echo "===> name: ".$name. ", Value: ".$value."<br>";
+
+ foreach(explode(' ',$coordsDom->nodeValue) as $pointCoords){
+ list($x,$y,$z) = explode(' ',$pointCoords);
+ $gmlMultiLine->addPoint($x, $y, $cnt);
+ }
+
+ $cnt++;
+ }
+ return $gmlMultiLine;
+ }
+
+ public static function parseMultiCurve ($domNode) {
+ $gmlMultiLine = new GmlMultiLine();
+
+ $simpleXMLNode = simplexml_import_dom($domNode);
+
+ $simpleXMLNode->registerXPathNamespace('gml', 'http://www.opengis.net/gml');
+
$allCoords = $simpleXMLNode->xpath("gml:curveMembers/gml:LineString/gml:posList");
$cnt=0;
@@ -328,9 +358,9 @@
$feature->geometry->srs = $srs;
break;
case "gml:MultiCurve" :
- $feature->geometry = self::parseMultiLine($geomNode);
+ $feature->geometry = self::parseMultiCurve($geomNode);
if ($feature->geometry->isEmpty()) {
- $feature->geometry = Gml_2_Factory::parseMultiLine($geomNode);
+ $feature->geometry = self::parseMultiLine($geomNode);
}
$feature->geometry->srs = $srs;
break;
More information about the Mapbender_commits
mailing list