public function getLength(DistanceInterface $calculator)
{
$distance = 0.0;
if (count($this->points) <= 1) {
return $distance;
}
foreach ($this->getSegments() as $segment) {
$distance += $segment->getLength($calculator);
}
return $distance;
}
public function testGetLength() { $this->assertEquals(10576798.9, $this->polyline->getLength(new Vincenty()), '', 0.1); }