Function UtmProjection.forward
Project a geographic coordinate in this explicit UTM zone.
Parameters
| Name | Description |
|---|---|
| source | Geographic source coordinate. |
Returns
Easting and northing in metres.
Throws
GeodesyValueException when the prepared projection is invalid or
the source lies outside the delegated bounded TM domain.
Example
Example projecting in a prepared UTM zone.
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 result = projection .forward(vienna);
assert(result .northing > 0.0);