You are here

public function Collection::numPoints in geoPHP 8

Same name and namespace in other branches
  1. 7 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;
}