H3

public class H3

Helpers to work with H3 (http://h3geo.org/) indexes.

  • Determines the spherical coordinates of the center point of an H3 index.

    Declaration

    Swift

    public static func h3HexToCoord(_ h3Hex: String) -> CLLocationCoordinate2D

    Parameters

    h3Hex

    The H3 index.

  • Determines the vertices spherical coordinates of an H3 index.

    Declaration

    Swift

    public static func verts(forH3Hex h3Hex: String) -> [CLLocationCoordinate2D]

    Parameters

    h3Hex

    The H3 index.

  • Determines the spherical coordinates of the center point and radius for the circle based on an H3 index.

    Declaration

    Swift

    public static func circleCenterAndRadius(fromH3Hex h3Hex: String) -> (center: CLLocationCoordinate2D, radius: CLLocationDistance)

    Parameters

    h3Hex

    The H3 index.

  • Determine H3 index from the spherical coordinates.

    Declaration

    Swift

    public static func h3Hex(coord: CLLocationCoordinate2D) -> String

    Parameters

    coord

    The spherical coordinates.