You are here

public function Collection::numPoints in geoPHP 7

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

Overrides Geometry::numPoints

2 methods override Collection::numPoints()
LineString::numPoints in geoPHP/lib/geometry/LineString.class.php
MultiPoint::numPoints in geoPHP/lib/geometry/MultiPoint.class.php

File

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

Class

Collection
Collection: Abstract class for compound geometries

Code

public function numPoints() {
  $num = 0;
  foreach ($this->components as $component) {
    $num += $component
      ->numPoints();
  }
  return $num;
}