[Mapbender-commits] r2458 - branches/2.5/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri May 16 04:38:12 EDT 2008


Author: christoph
Date: 2008-05-16 04:38:12 -0400 (Fri, 16 May 2008)
New Revision: 2458

Modified:
   branches/2.5/http/classes/class_gml2.php
Log:
added documentation

Modified: branches/2.5/http/classes/class_gml2.php
===================================================================
--- branches/2.5/http/classes/class_gml2.php	2008-05-16 08:29:57 UTC (rev 2457)
+++ branches/2.5/http/classes/class_gml2.php	2008-05-16 08:38:12 UTC (rev 2458)
@@ -427,6 +427,49 @@
 		return $nodeName;
 	}
 	
+	/**
+	 * Parses the feature segment of a GML and stores the geometry in the
+	 * $geometry variable of the class.
+	 * 	
+	 * Example of a feature segment of a GML. 
+	 * 	<gml:featureMember>
+	 * 		<ms:ROUTE fid="ROUTE.228168">
+	 * 			<gml:boundedBy>
+	 * 				<gml:Box srsName="EPSG:31466">
+	 * 					<gml:coordinates>2557381.0,5562371.1 2557653.7,5562526.0</gml:coordinates>
+	 * 				</gml:Box>
+	 * 			</gml:boundedBy>
+	 * 			<ms:geometry>
+	 * 				<gml:LineString>
+	 * 					<gml:coordinates>
+	 * 						2557380.97,5562526 2557390.96,
+	 * 						5562523.22 2557404.03,5562518.2 2557422.31,
+	 * 						5562512 2557437.16,5562508.37 2557441.79,
+	 * 						5562507.49 2557454.31,5562505.1 2557464.27,
+	 * 						5562503.97 2557473.24,5562502.97 2557491.67,
+	 * 						5562502.12 2557505.65,5562502.43 2557513.78,
+	 * 						5562501.12 2557520.89,5562498.79 2557528.5,
+	 * 						5562495.07 2557538.9,5562488.91 2557549.5,
+	 * 						5562483.83 2557558.55,5562476.61 2557569.07,
+	 * 						5562469.82 2557576.61,5562462.72 2557582.75,
+	 * 						5562457.92 2557588.57,5562452.56 2557590.38,
+	 * 						5562449.69 2557593.57,5562445.07 2557596.17,
+	 * 						5562441.31 2557601.71,5562433.93 2557612.97,
+	 * 						5562421.03 2557626,5562405.33 2557639.66,
+	 * 						5562389.75 2557653.69,5562371.12 
+	 * 					</gml:coordinates>
+	 * 				</gml:LineString>
+	 * 			</ms:geometry>
+	 * 			<code>354</code>
+	 * 			<Verkehr>0</Verkehr>
+	 * 			<rlp>t</rlp>
+	 * 		</ms:ROUTE>
+	 * 	</gml:featureMember>
+	 * 
+	 * @return void
+	 * @param $domNode DOMNodeObject the feature tag of the GML 
+	 * 								(<gml:featureMember> in the above example)
+	 */
 	public function parse($domNode) {
 		$currentSibling = $domNode->firstChild;
 		
@@ -446,7 +489,6 @@
 			if ($currentSibling->hasChildNodes()){
 				$geomNode = $currentSibling->firstChild; 
 					$geomType = $geomNode->nodeName;
-//					echo "geomtype: " . $geomType . "<br>";
 					switch ($geomType) {
 						case "gml:Polygon" :
 							$this->geometry = new GMLPolygon();
@@ -459,17 +501,14 @@
 						case "gml:Point" :
 							$this->geometry = new GMLPoint();
 							$this->geometry->parsePoint($geomNode);
-#							$this->properties["Mapbender:icon"] = "../img/sy_star.png";
 							break;
 						case "gml:MultiLineString" :
 							$this->geometry = new GMLMultiLine();
 							$this->geometry->parseMultiLine($geomNode);
-//							$this->properties["Mapbender:icon"] = "../img/sy_star.png";
 							break;
 						case "gml:MultiPolygon" :
 							$this->geometry = new GMLMultiPolygon();
 							$this->geometry->parseMultiPolygon($geomNode);
-//							$this->properties["Mapbender:icon"] = "../img/sy_star.png";
 							break;
 					}
 			} 



More information about the Mapbender_commits mailing list