GLG Toolkit, Java Class Library  Version 4.6

UTM MGRS utility class. More...

Detailed Description

UTM MGRS utility class.

This class provides methods for converting between the UTM and lat/lon GIS coordinate systems.

Static Public Member Functions

static void LatLonToUtm (double lat, double lon, GlgUtmPoint utm_point)
 Lat/Lon to UTM coordinate conversion utility. More...
 
static void LatLonToUtm (GlgLatLonPoint lat_lon_point, GlgUtmPoint utm_point)
 Lat/Lon to UTM coordinate conversion utility. More...
 
static int MgrsToUtm (String mgrs_coord, GlgUtmPoint utm_point)
 MGRS to UTM coordinate conversion utility. More...
 
static boolean UtmToLatLon (GlgUtmPoint utm_point, GlgLatLonPoint lat_lon)
 UTM to Lat/Lon coordinate conversion utility. More...
 
static String UtmToMgrs (GlgUtmPoint utm_point, int accuracy)
 UTM to MGRS coordinate conversion utility. More...
 

Static Public Attributes

static final int GLM_10000_METER = 1
 Accuracy constant. More...
 
static final int GLM_1000_METER = 2
 Accuracy constant. More...
 
static final int GLM_100_METER = 3
 Accuracy constant. More...
 
static final int GLM_10_METER = 4
 Accuracy constant. More...
 
static final int GLM_1_METER = 5
 Accuracy constant. More...
 
static final int GLM_FAILED_ACCURACY = -1
 Accuracy constant indicating a failed coordinate conversion. More...
 

Member Data Documentation

◆ GLM_10000_METER

final int GLM_10000_METER = 1
static

Accuracy constant.

◆ GLM_1000_METER

final int GLM_1000_METER = 2
static

Accuracy constant.

◆ GLM_100_METER

final int GLM_100_METER = 3
static

Accuracy constant.

◆ GLM_10_METER

final int GLM_10_METER = 4
static

Accuracy constant.

◆ GLM_1_METER

final int GLM_1_METER = 5
static

Accuracy constant.

◆ GLM_FAILED_ACCURACY

final int GLM_FAILED_ACCURACY = -1
static

Accuracy constant indicating a failed coordinate conversion.

Member Function Documentation

◆ LatLonToUtm() [1/2]

static void LatLonToUtm ( double  lat,
double  lon,
GlgUtmPoint  utm_point 
)
static

Lat/Lon to UTM coordinate conversion utility.

Parameters
latcoordinate to be converted.
loncoordinate to be converted.
utm_pointutm point to receive converted coordinates.

◆ LatLonToUtm() [2/2]

static void LatLonToUtm ( GlgLatLonPoint  lat_lon_point,
GlgUtmPoint  utm_point 
)
static

Lat/Lon to UTM coordinate conversion utility.

Parameters
lat_lon_pointlat/lon coordinates to be converted.
utm_pointutm point to receive converted coordinates.

◆ MgrsToUtm()

static int MgrsToUtm ( String  mgrs_coord,
GlgUtmPoint  utm_point 
)
static

MGRS to UTM coordinate conversion utility.

Parameters
mgrs_coordMGRS coordinate string to be converted.
utm_pointutm point to be filled with the converted utm coordinates.
Returns
Accuracy of a succesfull conversion (one of the accuracy constants), or GLM_FAILED_ACCURACY if conversion fails.

◆ UtmToLatLon()

static boolean UtmToLatLon ( GlgUtmPoint  utm_point,
GlgLatLonPoint  lat_lon 
)
static

UTM to Lat/Lon coordinate conversion utility.

Parameters
utm_pointutm coordinates to be converted.
lat_lonlat/lon point to receive converted coordinates.
Returns
Returns true if conversion succeeds.

◆ UtmToMgrs()

static String UtmToMgrs ( GlgUtmPoint  utm_point,
int  accuracy 
)
static

UTM to MGRS coordinate conversion utility.

Parameters
utm_pointutm coordinates to be converted.
accuracyAn accuracy constant to specify accuracy of the coordinate conversion.
Returns
Converted MGRS coordinate string with the requested accuracy.