public function Polygon::dimension in geoPHP 8
Same name and namespace in other branches
- 7 geoPHP/lib/geometry/Polygon.class.php \Polygon::dimension()
Overrides Collection::dimension
File
- geoPHP/
lib/ geometry/ Polygon.class.php, line 114
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 dimension() {
if ($this
->isEmpty()) {
return 0;
}
return 2;
}