Package mil.nga.mgrs
Class MGRSUtils
- java.lang.Object
-
- mil.nga.mgrs.MGRSUtils
-
public class MGRSUtils extends Object
Military Grid Reference System utilities- Author:
- wnewman, osbornb
-
-
Constructor Summary
Constructors Constructor Description MGRSUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Hemisphere
getHemisphere(char bandLetter)
Get the hemisphere from the band letterstatic String
getLabelName(int zoneNumber, char bandLetter)
Get the label namestatic char
nextBandLetter(char letter)
Get the next band letterstatic char
previousBandLetter(char letter)
Get the previous band letterstatic void
validateBandLetter(char letter)
Validate the band letterstatic void
validateZoneNumber(int number)
Validate the zone number
-
-
-
Method Detail
-
validateZoneNumber
public static void validateZoneNumber(int number)
Validate the zone number- Parameters:
number
- zone number
-
validateBandLetter
public static void validateBandLetter(char letter)
Validate the band letter- Parameters:
letter
- band letter
-
nextBandLetter
public static char nextBandLetter(char letter)
Get the next band letter- Parameters:
letter
- band letter- Returns:
- next band letter, 'Y' (
MGRSConstants.MAX_BAND_LETTER
+ 1) if no next bands
-
previousBandLetter
public static char previousBandLetter(char letter)
Get the previous band letter- Parameters:
letter
- band letter- Returns:
- previous band letter, 'B' (
MGRSConstants.MIN_BAND_LETTER
- 1) if no previous bands
-
getLabelName
public static String getLabelName(int zoneNumber, char bandLetter)
Get the label name- Parameters:
zoneNumber
- zone numberbandLetter
- band letter- Returns:
- name
-
getHemisphere
public static Hemisphere getHemisphere(char bandLetter)
Get the hemisphere from the band letter- Parameters:
bandLetter
- band letter- Returns:
- hemisphere
-
-