GLG Toolkit

com.genlogic
Class GlgUtmMgrs

java.lang.Object
  extended by com.genlogic.GlgUtmMgrs

public class GlgUtmMgrs
extends java.lang.Object


Field Summary
static int GLM_1_METER
          Accuracy constant
static int GLM_10_METER
          Accuracy constant
static int GLM_100_METER
          Accuracy constant
static int GLM_1000_METER
          Accuracy constant
static int GLM_10000_METER
          Accuracy constant
 
Constructor Summary
GlgUtmMgrs()
           
 
Method Summary
static void LatLonToUtm(double lat, double lon, GlgUtmPoint utm_point)
          Lat/Lon to UTM coordinate conversion utility.
static void LatLonToUtm(GlgLatLonPoint lat_lon_point, GlgUtmPoint utm_point)
          Lat/Lon to UTM coordinate conversion utility.
static int MgrsToUtm(java.lang.String mgrs_buf, GlgUtmPoint utm_point)
          MGRS to UTM coordinate conversion utility.
static boolean UtmToLatLon(GlgUtmPoint utm_point, GlgLatLonPoint lat_lon)
          UTM to Lat/Lon coordinate conversion utility.
static java.lang.String UtmToMgrs(GlgUtmPoint utm_point, int accuracy)
          UTM to MGRS coordinate conversion utility.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GLM_10000_METER

public static final int GLM_10000_METER
Accuracy constant

See Also:
Constant Field Values

GLM_1000_METER

public static final int GLM_1000_METER
Accuracy constant

See Also:
Constant Field Values

GLM_100_METER

public static final int GLM_100_METER
Accuracy constant

See Also:
Constant Field Values

GLM_10_METER

public static final int GLM_10_METER
Accuracy constant

See Also:
Constant Field Values

GLM_1_METER

public static final int GLM_1_METER
Accuracy constant

See Also:
Constant Field Values
Constructor Detail

GlgUtmMgrs

public GlgUtmMgrs()
Method Detail

MgrsToUtm

public static int MgrsToUtm(java.lang.String mgrs_buf,
                            GlgUtmPoint utm_point)
MGRS to UTM coordinate conversion utility.

Parameters:
mgrs_buf - MGRS coordinate string to be converted.
utm_point - utm point to be filled with the converted utm coordinates.
Returns:
Accuracy of a succesfull conversion (one of the accuracy constants) or -1 if conversion fails.

UtmToMgrs

public static java.lang.String UtmToMgrs(GlgUtmPoint utm_point,
                                         int accuracy)
UTM to MGRS coordinate conversion utility.

Parameters:
utm_point - utm coordinates to be converted.
accuracy - An accuracy constant to specify accuracy of the coordinate conversion.
Returns:
Converted MGRS coordinate string with the requested accuracy.

UtmToLatLon

public static boolean UtmToLatLon(GlgUtmPoint utm_point,
                                  GlgLatLonPoint lat_lon)
UTM to Lat/Lon coordinate conversion utility.

Parameters:
utm_point - utm coordinates to be converted.
lat_lon - lat/lon point to receive converted coordinates.
Returns:
Returns true if conversion succeeds.

LatLonToUtm

public static void LatLonToUtm(GlgLatLonPoint lat_lon_point,
                               GlgUtmPoint utm_point)
Lat/Lon to UTM coordinate conversion utility.

Parameters:
lat_lon_point - lat/lon coordinates to be converted.
utm_point - utm point to receive converted coordinates.

LatLonToUtm

public static void LatLonToUtm(double lat,
                               double lon,
                               GlgUtmPoint utm_point)
Lat/Lon to UTM coordinate conversion utility.

Parameters:
lat - coordinate to be converted.
lon - coordinate to be converted.
utm_point - utm point to receive converted coordinates.

GLG Toolkit