Class
GridZones
public class GridZones
- Grid Zones, Longitudinal Strips, and Latitude Bands
Properties
Methods
longitudinalStrip(_:)
public static func longitudinalStrip(_ zoneNumber: Int) -> LongitudinalStrip
- Get the longitudinal strip by zone number
- @param zoneNumber
-
zone number
- @return longitudinal strip
westLongitude(_:)
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
eastLongitude(_:)
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
latitudeBand(_:)
public static func latitudeBand(_ bandLetter: Character) -> LatitudeBand
- Get the latitude band by band letter
- @param bandLetter
-
band letter
- @return latitude band
southLatitude(_:)
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
northLatitude(_:)
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(_:)
- Get the zones within the bounds
- @param bounds
-
bounds
- @return grid zones
gridZone(_:_:)
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
gridZone(_:)
- Get the grid zone by MGRS
- @param mgrs
-
mgrs coordinate
- @return grid zone
gridRange(_:)
- Get a grid range from the bounds
- @param bounds
-
bounds
- @return grid range
zoneNumberRange(_:)
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
zoneNumberRange(_:_:)
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
zoneNumber(_:)
public static func zoneNumber(_ point: GridPoint) -> Int
- Get the zone number of the point
- @param point
-
point
- @return zone number
zoneNumber(_:_:)
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
zoneNumber(_:)
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
zoneNumber(_:_:)
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
bandLetterRange(_:)
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
bandLetterRange(_:_:)
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
bandLetter(_:)
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
bandLetter(_:_:)
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
isSvalbard(_:_:)
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
isSvalbardLetter(_:)
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
isSvalbardZone(_:)
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