public class TLcdGeorefUtil extends Object implements 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
Constructor and Description |
---|
TLcdGeorefUtil() |
Modifier and Type | Method and Description |
---|---|
static ILcd2DEditablePoint |
georef2LonLat(String aGeoRefString)
Converts a GEOREF coordinate into a
ILcd2DEditablePoint . |
static String |
lonLat2Georef(double aLongitude,
double aLatitude,
int aNumberOfDigits)
Converts a lon-lat point into GEOREF coordinates.
|
public static ILcd2DEditablePoint georef2LonLat(String aGeoRefString) throws ParseException
ILcd2DEditablePoint
.
The GEOREF coordinate for a position consists of a group of letters
and numbers with the following format: FGfgMMxxmmxx
aGeoRefString
- string representation of GEOREF coordinate.ILcd2DEditablePoint
that corresponds to aGeoRefString.ParseException
- aGeoRefString is not a valid representation of a Georef coordinate.public static String lonLat2Georef(double aLongitude, double aLatitude, int aNumberOfDigits)
FGfgMMxxmmxx
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.aLongitude,aLatitude
.