Struct UpsProjection
Prepared UPS projection for one explicit polar aspect.
struct UpsProjection(T)
if (isGeodesyScalar!T);
The projection is fixed to WGS 84, longitude of natural origin zero, scale factor 0.994, and false easting/northing 2000000 metres.
Explicit prepared use admits the UPS overlap domain:
Properties
| Name | Type | Description |
|---|---|---|
ellipsoid[get]
|
Ellipsoid!T | Fixed WGS 84 ellipsoid used by UPS. |
falseEasting[get]
|
T | Fixed UPS false easting: 2000000 metres. |
falseNorthing[get]
|
T | Fixed UPS false northing: 2000000 metres. |
hemisphere[get]
|
UpsHemisphere | Explicit UPS polar aspect. |
isValid[get]
|
bool | True when this value represents a prepared UPS projection. |
latitudeOfNaturalOrigin[get]
|
Latitude!T | Fixed UPS polar latitude of natural origin. |
longitudeOfNaturalOrigin[get]
|
Longitude!T | Fixed UPS longitude of natural origin: zero degrees. |
scaleFactorAtNaturalOrigin[get]
|
T | Fixed UPS natural-origin scale: 0.994. |
Methods
| Name | Description |
|---|---|
forward
(source)
|
Convert a position in the chosen polar hemisphere to UPS metres. |
forwardFactors
(source)
|
Compute conformal factors in the explicit legal UPS domain or throw. |
fromHemisphere
(hemisphere)
|
Prepare the standard UPS grid for the chosen hemisphere. |
reverse
(source)
|
Convert UPS grid coordinates back into a geographic position. |
reverseFactors
(source)
|
Compute reverse factors for an admitted represented UPS coordinate or throw. |
tryForward
(source, result)
|
Project within the explicit legal UPS overlap domain without throwing. |
tryForwardFactors
(source, result)
|
Compute conformal factors in the explicit legal UPS domain. |
tryFromHemisphere
(hemisphere, result)
|
Prepare the standard UPS grid for one hemisphere without throwing. |
tryReverse
(source, result)
|
Convert UPS easting and northing back to latitude and longitude. |
tryReverseFactors
(source, result)
|
Compute reverse factors for an admitted represented UPS coordinate. |
north
latitude >= +83.5 degrees
south
latitude <= -79.5 degrees
Example
Example using a prepared UPS projection.
import geodesy;
const projection = UpsProjection!double .fromHemisphere(
UpsHemisphere .north);
const point = GeographicCoordinate!double .fromComponents(
Latitude!double .fromDegrees(85.0),
Longitude!double .fromDegrees(20.0));
const projected = projection .forward(point);
assert(projected .easting > 1_200_000.0);