Skip to content

Coordinate

Properties

latitude

protected \Qubus\ValueObjects\Geography\Latitude $latitude

longitude

protected \Qubus\ValueObjects\Geography\Longitude $longitude

ellipsoid

protected ?\Qubus\ValueObjects\Geography\Ellipsoid $ellipsoid

Methods

__construct

Returns a new Coordinate object.

public __construct(\Qubus\ValueObjects\Geography\Latitude $latitude, \Qubus\ValueObjects\Geography\Longitude $longitude, ?\Qubus\ValueObjects\Geography\Ellipsoid $ellipsoid = null): mixed

Parameters:

Parameter Type Description
$latitude \Qubus\ValueObjects\Geography\Latitude
$longitude \Qubus\ValueObjects\Geography\Longitude
$ellipsoid ?\Qubus\ValueObjects\Geography\Ellipsoid

__toString

Returns a native string version of the Coordinates object in format "$latitude,$longitude".

public __toString(): string

fromNative

Returns a new Coordinate object from native PHP arguments.

public static fromNative(): \Qubus\ValueObjects\Geography\Coordinate|\Qubus\ValueObjects\ValueObject
  • This method is static.

Throws:


equals

Tells whether tow Coordinate objects are equal.

public equals(\Qubus\ValueObjects\Geography\Coordinate|\Qubus\ValueObjects\ValueObject $coordinate): bool

Parameters:

Parameter Type Description
$coordinate \Qubus\ValueObjects\Geography\Coordinate|\Qubus\ValueObjects\ValueObject

getLatitude

Returns latitude.

public getLatitude(): \Qubus\ValueObjects\Geography\Latitude

getLongitude

Returns longitude.

public getLongitude(): \Qubus\ValueObjects\Geography\Longitude

getEllipsoid

Returns ellipsoid.

public getEllipsoid(): \Qubus\ValueObjects\Geography\Ellipsoid

toDegreesMinutesSeconds

Returns a degrees/minutes/seconds representation of the coordinate.

public toDegreesMinutesSeconds(): \Qubus\ValueObjects\StringLiteral\StringLiteral

Throws:


toDecimalMinutes

Returns a decimal minutes representation of the coordinate.

public toDecimalMinutes(): \Qubus\ValueObjects\StringLiteral\StringLiteral

Throws:


toUniversalTransverseMercator

Returns a Universal Transverse Mercator projection representation of the coordinate in meters.

public toUniversalTransverseMercator(): \Qubus\ValueObjects\StringLiteral\StringLiteral

Throws:


distanceFrom

Calculates the distance between two Coordinate objects.

public distanceFrom(\Qubus\ValueObjects\Geography\Coordinate $coordinate, \Qubus\ValueObjects\Geography\DistanceUnit|null $unit = null, \Qubus\ValueObjects\Geography\DistanceFormula|null $formula = null): \Qubus\ValueObjects\Number\RealNumber

Parameters:

Parameter Type Description
$coordinate \Qubus\ValueObjects\Geography\Coordinate
$unit \Qubus\ValueObjects\Geography\DistanceUnit|null
$formula \Qubus\ValueObjects\Geography\DistanceFormula|null

Throws:


getBaseCoordinate

Returns the underlying Coordinate object.

protected static getBaseCoordinate(\Qubus\ValueObjects\Geography\Coordinate|\Qubus\ValueObjects\ValueObject $coordinate): \League\Geotools\Coordinate\Coordinate
  • This method is static.

Parameters:

Parameter Type Description
$coordinate \Qubus\ValueObjects\Geography\Coordinate|\Qubus\ValueObjects\ValueObject


Automatically generated on 2025-10-13