mgrs-ios 1.1.6 Documentation

Enumeration Grid​Type

public enum GridType: Int, CaseIterable  
  • Grid type enumeration
GridType GridType Int Int GridType->Int CaseIterable CaseIterable GridType->CaseIterable

Conforms To

CaseIterable
Int

Enumeration Cases

GZD

case GZD
  • Grid Zone Designator

HUNDRED_KILOMETER

case HUNDRED_KILOMETER
  • Hundred Kilometer

TEN_KILOMETER

case TEN_KILOMETER
  • Ten Kilometer

KILOMETER

case KILOMETER
  • Kilometer

HUNDRED_METER

case HUNDRED_METER
  • Hundred Meter

TEN_METER

case TEN_METER
  • Ten Meter

METER

case METER
  • Meter

Methods

precision()

public func precision() -> Int  
  • Grid precision in meters
  • @return precision meters

accuracy()

public func accuracy() -> Int  
  • Get the Grid Type accuracy number of digits in the easting and northing
  • values
  • @return accuracy digits

with​Accuracy(_:​)

public static func withAccuracy(_ accuracy: Int) -> GridType  
  • Get the Grid Type with the accuracy number of digits in the easting and
  • northing values. Accuracy must be inclusively between 0
  • (GridType.HUNDRED_KILOMETER) and 5 (GridType.METER).
  • @param accuracy
  •        accuracy digits between 0 (inclusive) and 5 (inclusive)
    
  • @return grid type

precision(_:​)

public static func precision(_ value: Double) -> GridType  
  • Get the precision of the value in meters based upon trailing 0's
  • @param value
  •        value in meters
    
  • @return precision grid type

less​Precise(_:​)

public static func lessPrecise(_ type: GridType) -> [GridType]  
  • Get the less precise (larger precision value) grid types
  • @param type
  •        grid type
    
  • @return grid types less precise

more​Precise(_:​)

public static func morePrecise(_ type: GridType) -> [GridType]  
  • Get the more precise (smaller precision value) grid types
  • @param type
  •        grid type
    
  • @return grid types more precise