CoordinateLock_UTM_MGRS_Zone Method
Locks converted UTM and MGRS longitudinal grid zones to the specified zone number. This will allow over-projection and allow users to remain in a single desired zone.
This should be used with caution as precision loss will occur.
Namespace: CoordinateSharpAssembly: CoordinateSharp (in CoordinateSharp.dll) Version: 3.1.1.1
XMLNS for XAML: Not mapped to an xmlns.
public void Lock_UTM_MGRS_Zone(
int zone
)
Parameters
- zone Int32
- UTM longitudinal grid zone
The following example locks a Coordinate that would normal project into grid zone 31, into grid zone 30 for over-projection.
Coordinate coord = new Coordinate(51.5074,1);
//Normal projection at this Coordinate below
//UTM: 31U 361203mE 5708148mN
//MGRS: 31U CT 61203 08148
//Lock UTM and MGRS zones to 30 for over-projection.
coord.Lock_UTM_MGRS_Zone(30);
//Over-projected coordinates
Console.WriteLine(coord.UTM); //30U 777555mE 5713840mN
Console.WriteLine(coord.MGRS); //30U YC 77555 13840