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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jan 4 09:51:18 EST 2011


Author: verenadiewald
Date: 2011-01-04 06:51:18 -0800 (Tue, 04 Jan 2011)
New Revision: 7418

Modified:
   trunk/mapbender/http/classes/class_gml_2_factory.php
   trunk/mapbender/http/classes/class_gml_polygon.php
Log:
start ringCount for parsePolygon and parseMultiPolygon as 1-based for correct handling of innerRings in function addPointToRing 

Modified: trunk/mapbender/http/classes/class_gml_2_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_gml_2_factory.php	2011-01-03 09:37:36 UTC (rev 7417)
+++ trunk/mapbender/http/classes/class_gml_2_factory.php	2011-01-04 14:51:18 UTC (rev 7418)
@@ -99,7 +99,7 @@
 		
 		$innerRingNodeArray = $simpleXMLNode->xpath("gml:innerBoundaryIs/gml:LinearRing");
 		if ($innerRingNodeArray) {
-			$ringCount = 0;
+			$ringCount = 1;
 			foreach ($innerRingNodeArray as $ringNode) {
 				$coordinates = $ringNode->xpath("gml:coordinates");
 				foreach ($coordinates as $coordinate) {

Modified: trunk/mapbender/http/classes/class_gml_polygon.php
===================================================================
--- trunk/mapbender/http/classes/class_gml_polygon.php	2011-01-03 09:37:36 UTC (rev 7417)
+++ trunk/mapbender/http/classes/class_gml_polygon.php	2011-01-04 14:51:18 UTC (rev 7418)
@@ -36,6 +36,13 @@
 		array_push($this->pointArray, array("x" => $x, "y" => $y));
 	}
 	
+	/**
+	 * @param integer 1-based index of the innerRing which to add the point to
+	 * @param float x coordinate of the point
+	 * @param float y-coordinate of the point
+	 * @return void
+	 *
+	 */
 	public function addPointToRing ($i, $x, $y) {
 		if (count($this->innerRingArray) < $i) {
 			array_push($this->innerRingArray, array());



More information about the Mapbender_commits mailing list