You are here

public function Collection::explode in geoPHP 8

Same name and namespace in other branches
  1. 7 geoPHP/lib/geometry/Collection.class.php \Collection::explode()

Overrides Geometry::explode

1 call to Collection::explode()
Polygon::isSimple in geoPHP/lib/geometry/Polygon.class.php
2 methods override Collection::explode()
LineString::explode in geoPHP/lib/geometry/LineString.class.php
MultiPoint::explode in geoPHP/lib/geometry/MultiPoint.class.php

File

geoPHP/lib/geometry/Collection.class.php, line 272

Class

Collection
Collection: Abstract class for compound geometries

Code

public function explode() {
  $parts = array();
  foreach ($this->components as $component) {
    $parts = array_merge($parts, $component
      ->explode());
  }
  return $parts;
}