Tile

public struct Tile : Codable, Equatable, Hashable

The Tile is a representation of a turbulence report’s H3 index area within a corresponding altitude box.

SkyPath divides the world into 10x10 miles x 1000 feet high logical rectangular boxes, which were found to be the best balance; not to overload the pilots with information, but give enough granularity for the pilots to be able to take action and avoid CAT consequences.

SkyPath uses H3 hexagonal hierarchical geospatial indexing system. H3 resolution 5 is used to represent turbulence area by hexagons of different severity levels.

SDK handles all work with H3 indexes out of the box so you don’t need to do anything for it on your side.

  • H3 hex index with H3 resolution 5.

    Declaration

    Swift

    public var h3Hex: String
  • H3 index with H3 resolution 5.

    Declaration

    Swift

    public var h3Index: H3Index { get }
  • alt

    A SkyPath tile altitude, where 1 is 1000 feet, so if alt is 38 it stands for 38,000..<39,000 feet range.

    Declaration

    Swift

    public var alt: Int
  • key

    A key in the format h3Hex which uniquely identifies this tile in a world. Example: 852aaa37fffffff-38.

    Declaration

    Swift

    public var key: String { get }
  • A key using an H3 index only. Example: 852aaa37fffffff.

    Declaration

    Swift

    public var keyByCoord: String { get }
  • An altitude range of this tile in meters if alt is not nil, otherwise the range is invalid.

    Declaration

    Swift

    public var altMetersRange: ClosedRange<Double> { get }
  • Creates a Tile using an H3 hex index and optional altitude.

    Declaration

    Swift

    public init(h3Hex: String, alt: Int?)

    Parameters

    h3Hex

    An H3 hex index.

    alt

    A SkyPath altitude where 1 is 1000 feet. Optional.

  • Creates a Tile using an H3 index and optional altitude.

    Declaration

    Swift

    public init(h3Index: H3Index, alt: Int?)

    Parameters

    h3Index

    An H3 index.

    alt

    A SkyPath altitude where 1 is 1000 feet. Optional.

  • Creates a Tile using a Tile.key value. It is a block that is identified by H3 index and altitude.

    Declaration

    Swift

    public init(key: String)

    Parameters

    key

    A Tile.key value. If invalid, a Tile object will be created with an empty h3Hex and alt=-1.

  • Creates a Tile using a coordinate that is translated to the corresponding H3 index, and an optional altitude block.

    Declaration

    Swift

    public init(coord: CLLocationCoordinate2D, alt: Int? = nil)

    Parameters

    coord

    A coordinate that is translated to the corresponding H3 index.

    alt

    A SkyPath altitude where 1 is 1000 feet. Optional.