You are here

public function Polygon::numInteriorRings in geoPHP 7

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

Overrides Collection::numInteriorRings

File

geoPHP/lib/geometry/Polygon.class.php, line 110

Class

Polygon
Polygon: A polygon is a plane figure that is bounded by a closed path, composed of a finite sequence of straight line segments

Code

public function numInteriorRings() {
  if ($this
    ->isEmpty()) {
    return 0;
  }
  return $this
    ->numGeometries() - 1;
}