C# Класс csCommon.Converters.MgrsConversion

Class for conversion between Latitude-Longitude coordinates and MGRS (Military Grid Reference System) coordinates. For more details, see the documentation of NETGeographicLib [http://geographiclib.sourceforge.net/html/NET/].
Показать файл Открыть проект

Открытые методы

Метод Описание
convertLatLonToMgrs ( double lat, double lon ) : string

Returns a string representation the MGRS coordinates, with the highest level of precision (1 m).

convertLatLonToMgrsWithPrecision ( double lat, double lon, int prec ) : string

Returns a string representation the MGRS coordinates, with specified precision. Precision should be specified with the prec parameter: prec = 1 -> 10 km precision prec = 2 -> 1 km precision prec = 3 -> 100 m precision prec = 4 -> 10 m precision prec = 5 -> 1 m precision

convertMgrsToLatLon ( string mgrs ) : double[]

Returns a double array with [lat, lon] in degrees

Описание методов

convertLatLonToMgrs() публичный статический Метод

Returns a string representation the MGRS coordinates, with the highest level of precision (1 m).
public static convertLatLonToMgrs ( double lat, double lon ) : string
lat double Latitude in degrees
lon double Longitude in degrees
Результат string

convertLatLonToMgrsWithPrecision() публичный статический Метод

Returns a string representation the MGRS coordinates, with specified precision. Precision should be specified with the prec parameter: prec = 1 -> 10 km precision prec = 2 -> 1 km precision prec = 3 -> 100 m precision prec = 4 -> 10 m precision prec = 5 -> 1 m precision
public static convertLatLonToMgrsWithPrecision ( double lat, double lon, int prec ) : string
lat double Latitude in degrees
lon double Longitude in degrees
prec int Precision parameter (see description)
Результат string

convertMgrsToLatLon() публичный статический Метод

Returns a double array with [lat, lon] in degrees
public static convertMgrsToLatLon ( string mgrs ) : double[]
mgrs string MGRS string
Результат double[]