pointArray); if ($numberOfPoints > 0) { $str = ""; for ($i=0; $i < $numberOfPoints; $i++) { if ($i > 0) { $str .= ","; } if ($this->pointArray[$i]["z"]) { $str .= "[".$this->pointArray[$i]["x"].",".$this->pointArray[$i]["y"].",".$this->pointArray[$i]["z"]."]"; } else { $str .= "[".$this->pointArray[$i]["x"].",".$this->pointArray[$i]["y"]."]"; } } return "[" . $str . "]"; } $e = new mb_exception("KMLLinearRing: toGeoJSON: no points in this linear ring."); return ""; } public function transform($targetEpsg){ $numberOfPoints = count($this->pointArray); if ($numberOfPoints > 0) { for ($i=0; $i < $numberOfPoints; $i++) { $pt = new Mapbender_point($this->pointArray[$i]["x"], $this->pointArray[$i]["y"], $this->pointArray[$i]["z"], 4326); $pt->transform($targetEpsg); $this->pointArray[$i]["x"] = $pt->x; $this->pointArray[$i]["y"] = $pt->y; $this->pointArray[$i]["z"] = $pt->z; } } } } ?>