Function TransverseMercator.forward

Project a geographic coordinate.

ProjectedCoordinate!T forward(
  const GeographicCoordinate!T source
) const @safe;

Parameters

NameDescription
source Geographic source coordinate.

Returns

Projected easting and northing in the ellipsoid linear unit.

Throws

GeodesyValueException when the projection is invalid or the source lies outside the supported bounded domain.

Example

Example projecting a geographic coordinate.

import geodesy;
const projection = TransverseMercator!double.fromParameters(
    wgs84!double(),
    Latitude!double.fromDegrees(0.0),
    Longitude!double.fromDegrees(15.0),
    0.9996,
    500_000.0,
    0.0);
const source = GeographicCoordinate!double.fromComponents(
    Latitude!double.fromDegrees(48.20849),
    Longitude!double.fromDegrees(16.37208));
const projected = projection.forward(source);
assert(projected.northing > 0.0);