You are here

protected function GeoRSS::geomFromXML in geoPHP 7

Same name and namespace in other branches
  1. 8 geoPHP/lib/adapters/GeoRSS.class.php \GeoRSS::geomFromXML()
1 call to GeoRSS::geomFromXML()
GeoRSS::geomFromText in geoPHP/lib/adapters/GeoRSS.class.php

File

geoPHP/lib/adapters/GeoRSS.class.php, line 68

Class

GeoRSS
PHP Geometry/GeoRSS encoder/decoder

Code

protected function geomFromXML() {
  $geometries = array();
  $geometries = array_merge($geometries, $this
    ->parsePoints());
  $geometries = array_merge($geometries, $this
    ->parseLines());
  $geometries = array_merge($geometries, $this
    ->parsePolygons());
  $geometries = array_merge($geometries, $this
    ->parseBoxes());
  $geometries = array_merge($geometries, $this
    ->parseCircles());
  if (empty($geometries)) {
    throw new Exception("Invalid / Empty GeoRSS");
  }
  return geoPHP::geometryReduce($geometries);
}