mgrs-ios 1.1.6 Documentation

Class Grid​Zones

public class GridZones  
  • Grid Zones, Longitudinal Strips, and Latitude Bands

Properties

strips

public static var strips: [Int: LongitudinalStrip] = [:] 
  • Longitudinal Strips

bands

public static var bands: [Character: LatitudeBand] = [:] 
  • Latitude Bands

grid​Zones

public static var gridZones: [Int: [Character: GridZone]] = [:] 
  • Grid Zones

Methods

longitudinal​Strip(_:​)

public static func longitudinalStrip(_ zoneNumber: Int) -> LongitudinalStrip  
  • Get the longitudinal strip by zone number
  • @param zoneNumber
  •        zone number
    
  • @return longitudinal strip

west​Longitude(_:​)

public static func westLongitude(_ zoneNumber: Int) -> Double  
  • Get the west longitude in degrees of the zone number
  • @param zoneNumber
  •        zone number
    
  • @return longitude in degrees

east​Longitude(_:​)

public static func eastLongitude(_ zoneNumber: Int) -> Double  
  • Get the east longitude in degrees of the zone number
  • @param zoneNumber
  •        zone number
    
  • @return longitude in degrees

latitude​Band(_:​)

public static func latitudeBand(_ bandLetter: Character) -> LatitudeBand  
  • Get the latitude band by band letter
  • @param bandLetter
  •        band letter
    
  • @return latitude band

south​Latitude(_:​)

public static func southLatitude(_ bandLetter: Character) -> Double  
  • Get the south latitude in degrees of the band letter
  • @param bandLetter
  •        band letter
    
  • @return latitude in degrees

north​Latitude(_:​)

public static func northLatitude(_ bandLetter: Character) -> Double  
  • Get the north latitude in degrees of the band letter
  • @param bandLetter
  •        band letter
    
  • @return latitude in degrees

zones(_:​)

public static func zones(_ bounds: Bounds) -> [GridZone]  
  • Get the zones within the bounds
  • @param bounds
  •        bounds
    
  • @return grid zones

grid​Zone(_:​_:​)

public static func gridZone(_ zoneNumber: Int, _ bandLetter: Character) -> GridZone?  
  • Get the grid zone by zone number and band letter
  • @param zoneNumber
  •        zone number
    
  • @param bandLetter
  •        band letter
    
  • @return grid zone

grid​Zone(_:​)

public static func gridZone(_ mgrs: MGRS) -> GridZone?  
  • Get the grid zone by MGRS
  • @param mgrs
  •        mgrs coordinate
    
  • @return grid zone

grid​Range(_:​)

public static func gridRange(_ bounds: Bounds) -> GridRange  
  • Get a grid range from the bounds
  • @param bounds
  •        bounds
    
  • @return grid range

zone​Number​Range(_:​)

public static func zoneNumberRange(_ bounds: Bounds) -> ZoneNumberRange  
  • Get a zone number range between the western and eastern bounds
  • @param bounds
  •        bounds
    
  • @return zone number range

zone​Number​Range(_:​_:​)

public static func zoneNumberRange(_ west: Double, _ east: Double) -> ZoneNumberRange  
  • Get a zone number range between the western and eastern longitudes
  • @param west
  •        western longitude in degrees
    
  • @param east
  •        eastern longitude in degrees
    
  • @return zone number range

zone​Number(_:​)

public static func zoneNumber(_ point: GridPoint) -> Int  
  • Get the zone number of the point
  • @param point
  •        point
    
  • @return zone number

zone​Number(_:​_:​)

public static func zoneNumber(_ longitude: Double, _ latitude: Double) -> Int  
  • Get the zone number of the longitude and latitude
  • @param longitude
  •        longitude
    
  • @param latitude
  •        latitude
    
  • @return zone number

zone​Number(_:​)

public static func zoneNumber(_ longitude: Double) -> Int  
  • Get the zone number of the longitude (degrees between
  • MGRSConstants.MIN_LON and MGRSConstants.MAX_LON). Eastern
  • zone number on borders.
  • @param longitude
  •        longitude in degrees
    
  • @return zone number

zone​Number(_:​_:​)

public static func zoneNumber(_ longitude: Double, _ eastern: Bool) -> Int  
  • Get the zone number of the longitude (degrees between
  • MGRSConstants.MIN_LON and MGRSConstants.MAX_LON)
  • @param longitude
  •        longitude in degrees
    
  • @param eastern
  •        true for eastern number on edges, false for western
    
  • @return zone number

band​Letter​Range(_:​)

public static func bandLetterRange(_ bounds: Bounds) -> BandLetterRange  
  • Get a band letter range between the southern and northern bounds
  • @param bounds
  •        bounds
    
  • @return band letter range

band​Letter​Range(_:​_:​)

public static func bandLetterRange(_ south: Double, _ north: Double) -> BandLetterRange  
  • Get a band letter range between the southern and northern latitudes in
  • degrees
  • @param south
  •        southern latitude in degrees
    
  • @param north
  •        northern latitude in degrees
    
  • @return band letter range

band​Letter(_:​)

public static func bandLetter(_ latitude: Double) -> Character  
  • Get the band letter of the latitude (degrees between
  • MGRSConstants.MIN_LAT and MGRSConstants.MAX_LAT).
  • Northern band letter on borders.
  • @param latitude
  •        latitude in degrees
    
  • @return band letter

band​Letter(_:​_:​)

public static func bandLetter(_ latitude: Double, _ northern: Bool) -> Character  
  • Get the band letter of the latitude (degrees between
  • MGRSConstants.MIN_LAT and MGRSConstants.MAX_LAT)
  • @param latitude
  •        latitude in degrees
    
  • @param northern
  •        true for northern band on edges, false for southern
    
  • @return band letter

is​Svalbard(_:​_:​)

public static func isSvalbard(_ zoneNumber: Int, _ bandLetter: Character) -> Bool  
  • Is the zone number and band letter a Svalbard GZD (31X - 37X)
  • @param zoneNumber
  •        zone number
    
  • @param bandLetter
  •        band letter
    
  • @return true if a Svalbard GZD

is​Svalbard​Letter(_:​)

public static func isSvalbardLetter(_ bandLetter: Character) -> Bool  
  • Is the band letter a Svalbard GZD (X)
  • @param bandLetter
  •        band letter
    
  • @return true if a Svalbard GZD

is​Svalbard​Zone(_:​)

public static func isSvalbardZone(_ zoneNumber: Int) -> Bool  
  • Is the zone number a Svalbard GZD (31 - 37)
  • @param zoneNumber
  •        zone number
    
  • @return true if a Svalbard GZD