You are here

public function Geometry::relate in geoPHP 8

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

File

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

Class

Geometry
Geometry abstract class

Code

public function relate(Geometry $geometry, $pattern = NULL) {
  if ($this
    ->geos()) {
    if ($pattern) {
      return $this
        ->geos()
        ->relate($geometry
        ->geos(), $pattern);
    }
    else {
      return $this
        ->geos()
        ->relate($geometry
        ->geos());
    }
  }
}