public function toXmlNoWrap() { if ($this->isComplex()) { $str = ""; foreach ($this->filterArray as $filter) { $str .= $filter->toXmlNoWrap(); } $op = $this->mapOperator($this->booleanOperator); return "<" . $op["open"] . ">" . $str . "</" . $op["close"] . ">"; } else { $k = "<ogc:PropertyName>" . $this->key . "</ogc:PropertyName>"; if (in_array($this->operator, explode(",", self::SPATIAL_OPERATORS))) { $gmlFactory = new UniversalGmlFactory(); $gml = $gmlFactory->createFromGeoJson($this->value, $this->wfsConf); $v = $gml->toGml(); } else { $v = "<ogc:Literal>" . $this->value . "</ogc:Literal>"; } $op = $this->mapOperator($this->operator); return "<" . $op["open"] . ">" . $k . $v . "</" . $op["close"] . ">"; } }
/** * Shortcut for GeoJSON conversion * * @return String * @param $geoJson String */ public static function geoJsonToGml($geoJson) { $gmlFactory = new UniversalGmlFactory(); $myGmlObj = $gmlFactory->createFromGeoJson($geoJson); return $myGmlObj->toGml(); }