You are here

public function Collection::haversineLength in geoPHP 7

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

Overrides Geometry::haversineLength

1 method overrides Collection::haversineLength()
LineString::haversineLength in geoPHP/lib/geometry/LineString.class.php

File

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

Class

Collection
Collection: Abstract class for compound geometries

Code

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