Units of angle

Tip

All angle units have helper methods ->asDegrees(), ->asRadians(), ->add(), ->subtract(), ->multiply() and ->divide()

Tip

You can access the list of supported angle units at runtime using Angle::getSupportedSRIDs() or Angle::getSupportedSRIDsWithHelp()

Degree

new Degree(float $angle)
Angle::makeUnit(float $angle, Angle::EPSG_DEGREE)
Angle::makeUnit(float $angle, 'urn:ogc:def:uom:EPSG::9102')

\(\frac{π}{180}\) radians

Tip

Degrees have a very large number of written representations. Although the output of PHPCoord will always be in decimal degrees, input helpers exist for many alternate representations.

Degree hemisphere

Degree::fromDegreeHemisphere(string $angle)
Angle::makeUnit(string $angle, Angle::EPSG_DEGREE_HEMISPHERE)
Angle::makeUnit(string $angle, 'urn:ogc:def:uom:EPSG::9116')

Format: degrees (real, any precision) - hemisphere abbreviation (single character N S E or W).

Degree minute

Degree::fromDegreeMinute(string $angle)
Angle::makeUnit(string $angle, Angle::EPSG_DEGREE_MINUTE)
Angle::makeUnit(string $angle, 'urn:ogc:def:uom:EPSG::9115')

Format: signed degrees (integer) - arc-minutes (real, any precision). Different symbol sets are in use as field separators, for example º ‘.

Degree minute hemisphere

Degree::fromDegreeMinuteHemisphere(string $angle)
Angle::makeUnit(string $angle, Angle::EPSG_DEGREE_MINUTE_HEMISPHERE)
Angle::makeUnit(string $angle, 'urn:ogc:def:uom:EPSG::9118')

Format: degrees (integer) - arc-minutes (real, any precision) - hemisphere abbreviation (single character N S E or W). Different symbol sets are in use as field separators, for example º ‘.

Degree minute second

Degree::fromDegreeMinuteSecond(string $angle)
Angle::makeUnit(string $angle, Angle::EPSG_DEGREE_MINUTE_SECOND)
Angle::makeUnit(string $angle, 'urn:ogc:def:uom:EPSG::9107')

Format: signed degrees (integer) - arc-minutes (integer) - arc-seconds (real, any precision). Different symbol sets are in use as field separators, for example º ‘ “.

Degree minute second hemisphere

Degree::fromDegreeMinuteSecondHemisphere(string $angle)
Angle::makeunit(string $angle, Angle::EPSG_DEGREE_MINUTE_SECOND_HEMISPHERE)
Angle::makeUnit(string $angle, 'urn:ogc:def:uom:EPSG::9108')

Format: degrees (integer) - arc-minutes (integer) - arc-seconds (real) - hemisphere abbreviation (single character N S E or W). Different symbol sets are in use as field separators for example º ‘ “.

Hemisphere degree

Degree::fromHemisphereDegree(string $angle)
Angle::makeUnit(string $angle, Angle::EPSG_HEMISPHERE_DEGREE)
Angle::makeUnit(string $angle, 'urn:ogc:def:uom:EPSG::9117')

Format: hemisphere abbreviation (single character N S E or W) - degrees (real, any precision).

Hemisphere degree minute

Degree::fromHemisphereDegreeMinute(string $angle)
Angle::makeUnit(string $angle, Angle::EPSG_HEMISPHERE_DEGREE_MINUTE)
Angle::makeUnit(string $angle, 'urn:ogc:def:uom:EPSG::9119')

Format: hemisphere abbreviation (single character N S E or W) - degrees (integer) - arc-minutes (real, any precision). Different symbol sets are in use as field separators, for example º ‘.

Hemisphere degree minute second

Degree::fromHemisphereDegreeMinuteSecond(string $angle)
Angle::makeUnit(string $angle, Angle::EPSG_HEMISPHERE_DEGREE_MINUTE_SECOND)
Angle::makeUnit(string $angle, 'urn:ogc:def:uom:EPSG::9120')

Format: hemisphere abbreviation (single character N S E or W) - degrees (integer) - arc-minutes (integer) - arc-seconds (real). Different symbol sets are in use as field separators for example º ‘ “.

Sexagesimal DMS

Degree::fromSexagesimalDMS(string $angle)
Angle::makeUnit(string $angle, Angle::EPSG_SEXAGESIMAL_DMS)
Angle::makeUnit(string $angle, 'urn:ogc:def:uom:EPSG::9110')

Format: signed degrees - period - minutes (2 digits) - integer seconds (2 digits) - fraction of seconds (any precision). Must include leading zero in minutes and seconds and exclude decimal point for seconds.

Arc second

new ArcSecond(float $angle)
Angle::makeUnit(float $angle, Angle::EPSG_ARC_SECOND)
Angle::makeUnit(float $angle, 'urn:ogc:def:uom:EPSG::9104')

\(\frac{1}{3600}\) degrees.

Milliarc second

new ArcSecond(float $angle / 1000)
Angle::makeUnit(float $angle, Angle::EPSG_MILLIARC_SECOND)
Angle::makeUnit(float $angle, 'urn:ogc:def:uom:EPSG::1031')

\(\frac{1}{3600000}\) degrees.

Radian

new Radian(float $angle)
Angle::makeUnit(Angle::EPSG_RADIAN)
Angle::makeUnit(float $angle, 'urn:ogc:def:uom:EPSG::9101')

SI derived unit (standard unit) for angles.

Microradian

new Radian(float $angle / 1000000)
Angle::makeunit(float $angle, Angle::EPSG_MICRORADIAN)
Angle::makeUnit(float $angle, 'urn:ogc:def:uom:EPSG::9109')

\(\frac{1}{1000000}\) radians.

Grad

new Grad(float $angle)
Angle::makeUnit(float $angle, Angle::EPSG_GRAD)
Angle::makeUnit(float $angle, 'urn:ogc:def:uom:EPSG::9105')

\(\frac{π}{200}\) radians.

Centesimal second

new Radian(float $angle * M_PI / 2000000)
Angle::makeUnit(float $angle, Angle::EPSG_CENTESIMAL_SECOND)
Angle::makeUnit(float $angle, 'urn:ogc:def:uom:EPSG::9113')

\(\frac{1}{100}\) of a centesimal minute or \(\frac{1}{10000}\) th of a grad and gon = \(\frac{π/200}{10000}\) radians.