public function Point::z in geoPHP 7
Same name and namespace in other branches
- 8 geoPHP/lib/geometry/Point.class.php \Point::z()
Returns Z (altitude) coordinate
Return value
float The Z coordinate or NULL is not a 3D point
Overrides Geometry::z
File
- geoPHP/
lib/ geometry/ Point.class.php, line 81
Class
- Point
- Point: The most basic geometry type. All other geometries are built out of Points.
Code
public function z() {
if ($this->dimension == 3) {
return $this->coords[2];
}
else {
return NULL;
}
}