You are here

public function Geometry::distance in geoPHP 8

Same name and namespace in other branches
  1. 7 geoPHP/lib/geometry/Geometry.class.php \Geometry::distance()

File

geoPHP/lib/geometry/Geometry.class.php, line 297

Class

Geometry
Geometry abstract class

Code

public function distance(Geometry $geometry) {
  if ($this
    ->geos()) {
    return $this
      ->geos()
      ->distance($geometry
      ->geos());
  }
}