Function PseudoMercator.forward
Project a geographic coordinate on the bounded Pseudo-Mercator sheet.
Parameters
| Name | Description |
|---|---|
| source | Geographic source coordinate. |
Returns
Projected easting and northing in the ellipsoid linear unit.
Throws
GeodesyValueException when the prepared operation is invalid,
the source lies outside the supported domain, or no finite
representable result can be produced.
Example
Example projecting a geographic coordinate.
import geodesy;
const projection = PseudoMercator!double .fromParameters(
wgs84!double(), Longitude!double .fromDegrees(0.0), 0.0, 0.0);
const source = GeographicCoordinate!double .fromComponents(
Latitude!double .fromDegrees(48.20849),
Longitude!double .fromDegrees(16.37208));
const result = projection .forward(source);
assert(result .northing > 0.0);