Click or drag to resize

CoordinateSet_Datum Method (Earth_Ellipsoid_Spec, Coordinate_Datum)

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.

Namespace:  CoordinateSharp
Assembly:  CoordinateSharp (in CoordinateSharp.dll) Version: 2.12.1.1
Syntax
C#
public void Set_Datum(
	Earth_Ellipsoid_Spec spec,
	Coordinate_Datum datum
)

Parameters

spec
Type: CoordinateSharpEarth_Ellipsoid_Spec
Earth ellipsoid spec
datum
Type: CoordinateSharpCoordinate_Datum
Coordinate_Datum
Examples
The following example demonstrates how to set the earths ellipsoid values for UTM/MGRS conversions only.
//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