point = array("x" => $x, "y" => $y); } public function toGml2 () { $str = ""; $str .= $this->point["x"] . "," . $this->point["y"]; $str .= ""; return $str; } public function toGml3 () { $str = ""; $str .= $this->point["x"] . " " . $this->point["y"]; $str .= ""; return $str; } public function toGeoJSON () { $str = ""; if ($this->point) { $str .= "{\"type\": \"Point\", \"coordinates\":"; $str .= "[".$this->point["x"].",".$this->point["y"]."]"; $str .= "}"; } else { $e = new mb_exception("GMLPoint: toGeoJSON: this point is null."); } return $str; } } ?>