You are here

public function LineString::dimension in geoPHP 8

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

Overrides Collection::dimension

File

geoPHP/lib/geometry/LineString.class.php, line 55

Class

LineString
LineString. A collection of Points representing a line. A line can have more than one segment.

Code

public function dimension() {
  if ($this
    ->isEmpty()) {
    return 0;
  }
  return 1;
}