You are here

public function Collection::isEmpty in geoPHP 7

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

Overrides Geometry::isEmpty

9 calls to Collection::isEmpty()
Collection::boundary in geoPHP/lib/geometry/Collection.class.php
Collection::centroid in geoPHP/lib/geometry/Collection.class.php
Collection::getBBox in geoPHP/lib/geometry/Collection.class.php
LineString::dimension in geoPHP/lib/geometry/LineString.class.php
Polygon::area in geoPHP/lib/geometry/Polygon.class.php

... See full list

File

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

Class

Collection
Collection: Abstract class for compound geometries

Code

public function isEmpty() {
  if (!count($this->components)) {
    return TRUE;
  }
  else {
    foreach ($this->components as $component) {
      if (!$component
        ->isEmpty()) {
        return FALSE;
      }
    }
    return TRUE;
  }
}