Struct UtmProjection
Prepared Universal Transverse Mercator projection for one explicit zone and north/south false-northing convention.
struct UtmProjection(T)
if (isGeodesyScalar!T);
Mathematics is delegated to TransverseMercator!T; this wrapper adds the
fixed UTM parameters, zone/hemisphere state, and terrestrial-metre
ellipsoid policy. Accepted ellipsoids have numerically metre-valued
semi-major axes in [6,000,000,7,000,000] and 0 < f <= 0.01.
Explicit-zone use does not reapply the automatic -80/+84 latitude band and does not recompute zone or hemisphere from each source point. Reuse this prepared type for bulk work in a known zone.
Properties
| Name | Type | Description |
|---|---|---|
ellipsoid[get]
|
Ellipsoid!T | Projection ellipsoid. |
falseEasting[get]
|
T | Fixed UTM false easting: 500000 metres. |
falseNorthing[get]
|
T | UTM false northing in metres. |
hemisphere[get]
|
UtmHemisphere | Explicit north/south false-northing convention. |
isValid[get]
|
bool | True when this value represents a supported prepared UTM projection. |
latitudeOfNaturalOrigin[get]
|
Latitude!T | Fixed UTM latitude of natural origin: zero degrees. |
longitudeOfNaturalOrigin[get]
|
Longitude!T | Zone central meridian. |
scaleFactorAtNaturalOrigin[get]
|
T | Fixed UTM natural-origin scale factor: 0.9996. |
zone[get]
|
UtmZone | Explicit UTM zone. |
Methods
| Name | Description |
|---|---|
forward
(source)
|
Project a geographic coordinate in this explicit UTM zone. |
forwardFactors
(source)
|
Evaluate conformal projection factors at a geographic source position. |
fromZone
(ellipsoid, zone, hemisphere)
|
Prepare an explicit UTM zone. |
reverse
(source)
|
Reverse a coordinate in this explicit UTM zone. |
reverseFactors
(source)
|
Evaluate conformal factors at a represented projected coordinate. |
tryForward
(source, result)
|
Project a geographic coordinate in this explicit UTM zone. |
tryForwardFactors
(source, result)
|
Evaluate conformal projection factors at a geographic source position. |
tryFromZone
(ellipsoid, zone, hemisphere, result)
|
Prepare an explicit UTM zone without throwing. |
tryReverse
(source, result)
|
Reverse a coordinate in this explicit UTM zone without throwing. |
tryReverseFactors
(source, result)
|
Evaluate conformal factors at a represented projected coordinate. |
Example
Example using struct UtmProjection(T) if (isGeodesyScalar!T).
import geodesy;
const projection = UtmProjection!double .fromZone(
wgs84!double(),
UtmZone .fromNumber(33),
UtmHemisphere .north);
const vienna = GeographicCoordinate!double .fromComponents(
Latitude!double .fromDegrees(48.20849),
Longitude!double .fromDegrees(16.37208));
const xy = projection .forward(vienna);
const back = projection .reverse(xy);
assert(back .latitude .degrees > 48.0);