public function Collection::geometryN in geoPHP 8
Same name and namespace in other branches
- 7 geoPHP/lib/geometry/Collection.class.php \Collection::geometryN()
Overrides Geometry::geometryN
3 calls to Collection::geometryN()
- LineString::length in geoPHP/
lib/ geometry/ LineString.class.php - LineString::pointN in geoPHP/
lib/ geometry/ LineString.class.php - Polygon::interiorRingN in geoPHP/
lib/ geometry/ Polygon.class.php
File
- geoPHP/
lib/ geometry/ Collection.class.php, line 148
Class
- Collection
- Collection: Abstract class for compound geometries
Code
public function geometryN($n) {
$n = intval($n);
if (array_key_exists($n - 1, $this->components)) {
return $this->components[$n - 1];
}
else {
return NULL;
}
}