You are here

public function Polygon::exteriorRing in geoPHP 8

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

Overrides Collection::exteriorRing

File

geoPHP/lib/geometry/Polygon.class.php, line 100

Class

Polygon
Polygon: A polygon is a plane figure that is bounded by a closed path, composed of a finite sequence of straight line segments

Code

public function exteriorRing() {
  if ($this
    ->isEmpty()) {
    return new LineString();
  }
  return $this->components[0];
}