Package com.luciad.view.map
Class TLcdGeorefUtil
java.lang.Object
com.luciad.view.map.TLcdGeorefUtil
- All Implemented Interfaces:
Serializable
TLcdGeorefUtil
is a utility class for the Military Georeference
of a latitude-longitude pair which ia also known as the World Geographic Reference System.
The GEOREF coordinate for a position consists of a group of letters and numbers with the following format:
FGfgMMxxmmxx
- F is a letter identifying a fifteen degree longitudinal zone
- G is a letter identifying a fifteen degree latitudinal zone
- f is a letter identifying a one degree zone of longitude within FG
- g is a letter identifying a one degree zone of latitude within FG
- MM minutes of longitude, up to a certain precision (.xx)
- mm minutes of latitude up to a certain precision (.xx)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ILcd2DEditablePoint
georef2LonLat
(String aGeoRefString) Converts a GEOREF coordinate into aILcd2DEditablePoint
.static String
lonLat2Georef
(double aLongitude, double aLatitude, int aNumberOfDigits) Converts a lon-lat point into GEOREF coordinates.
-
Constructor Details
-
TLcdGeorefUtil
public TLcdGeorefUtil()
-
-
Method Details
-
georef2LonLat
Converts a GEOREF coordinate into aILcd2DEditablePoint
. The GEOREF coordinate for a position consists of a group of letters and numbers with the following format:FGfgMMxxmmxx
- F is a letter identifying a fifteen degree longitudinal zone
- G is a letter identifying a fifteen degree latitudinal zone
- f is a letter identifying a one degree zone of longitude within FG
- g is a letter identifying a one degree zone of latitude within FG
- MM minutes of longitude, up to a certain precision (.xx)
- mm minutes of latitude up to a certain precision (.xx)
- Parameters:
aGeoRefString
- string representation of GEOREF coordinate.- Returns:
ILcd2DEditablePoint
that corresponds to aGeoRefString.- Throws:
ParseException
- aGeoRefString is not a valid representation of a Georef coordinate.
-
lonLat2Georef
Converts a lon-lat point into GEOREF coordinates. The GEOREF coordinate for a position consists of a group of letters and numbers with the following format:FGfgMMxxmmxx
- F is a letter identifying a fifteen degree longitudinal zone
- G is a letter identifying a fifteen degree latitudinal zone
- f is a letter identifying a one degree zone of longitude within FG
- g is a letter identifying a one degree zone of latitude within FG
- MM minutes of longitude, up to a certain precision (.xx)
- mm minutes of latitude up to a certain precision (.xx)
- Parameters:
aLongitude
- decimal longitude of lon-lat point to be converted.aLatitude
- decimal latitude of lon-lat point to be converted.aNumberOfDigits
- defines the precision as the number of digits after the decimal point of the minutes (MM.xx and mm.xx). It must be a value between 0 and 4 inclusive corresponding to a precision of 1 minute up to 0.0001 minutes respectively.- Returns:
- String representation of GEOREF coordinate of
aLongitude,aLatitude
.
-