mgrs-ios 1.1.6 Documentation

Class MGRSUtils

public class MGRSUtils  
  • Military Grid Reference System utilities

Methods

validate​Zone​Number(_:​)

public static func validateZoneNumber(_ number: Int)  
  • Validate the zone number
  • @param number
  •        zone number
    

validate​Band​Letter(_:​)

public static func validateBandLetter(_ letter: Character)  
  • Validate the band letter
  • @param letter
  •        band letter
    

next​Band​Letter(_:​)

public static func nextBandLetter(_ letter: Character) -> Character  
  • Get the next band letter
  • @param letter
  •        band letter
    
  • @return next band letter, 'Y' (MGRSConstants.MAX_BAND_LETTER + 1)
  •     if no next bands
    

previous​Band​Letter(_:​)

public static func previousBandLetter(_ letter: Character) -> Character  
  • Get the previous band letter
  • @param letter
  •        band letter
    
  • @return previous band letter, 'B' (MGRSConstants.MIN_BAND_LETTER
  •     - 1) if no previous bands
    

label​Name(_:​_:​)

public static func labelName(_ zoneNumber: Int, _ bandLetter: Character) -> String  
  • Get the label name
  • @param zoneNumber
  •        zone number
    
  • @param bandLetter
  •        band letter
    
  • @return name

hemisphere(_:​)

public static func hemisphere(_ bandLetter: Character) -> Hemisphere  
  • Get the hemisphere from the band letter
  • @param bandLetter
  •        band letter
    
  • @return hemisphere