CoordinateSet_Datum(Earth_Ellipsoid_Spec, Coordinate_Datum) Method

Set a custom datum for coordinate conversions and distance calculation for specified coordinate formats only. Objects must be loaded prior to setting if EagerLoading is turned off.

Definition

Namespace: CoordinateSharp
Assembly: CoordinateSharp (in CoordinateSharp.dll) Version: 3.1.1.1
XMLNS for XAML: Not mapped to an xmlns.
C#
public void Set_Datum(
	Earth_Ellipsoid_Spec spec,
	Coordinate_Datum datum
)

Parameters

spec  Earth_Ellipsoid_Spec
Earth ellipsoid spec
datum  Coordinate_Datum
Coordinate_Datum

Example

The following example demonstrates how to set the earths ellipsoid values for UTM/MGRS conversions only.
C#
//Initialize a coordinate with the default WGS84 Ellipsoid that eagerloads UTM/MGRS only.
EagerLoadType et = EagerLoadType.UTM_MGRS;
EagerLoad eagerLoad = new EagerLoad(et);
Coordinate c = new Coordinate(25, 25, et);

//Change Ellipsoid to GRS80 Datum for UTM_MGRS calculations only.
c.Set_Datum(Earth_Ellipsoid_Spec.GRS80_1979, Coordinate_Datum.UTM_MGRS);

See Also