for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* PHPCoord.
*
* @author Doug Wright
*/
declare(strict_types=1);
namespace PHPCoord\CoordinateOperation;
use PHPCoord\UnitOfMeasure\Angle\Angle;
use PHPCoord\UnitOfMeasure\Angle\Radian;
use PHPCoord\UnitOfMeasure\Length\Length;
use PHPCoord\UnitOfMeasure\Length\Metre;
* A geographic point w/out a CRS.
* @internal
class GeographicValue
{
* @var Angle
private $latitude;
private $longitude;
* @var Length
private $height;
public function __construct(Angle $latitude, Angle $longitude, ?Length $height)
$this->latitude = $latitude;
$this->longitude = $longitude;
$this->height = $height;
}
public function getLatitude(): Radian
return $this->latitude->asRadians();
public function getLongitude(): Radian
return $this->longitude->asRadians();
public function getHeight(): Metre
return $this->height ? $this->height->asMetres() : new Metre(0);