Measurement
Functions for computing distances, areas, and edge lengths.
Corresponds to the H3 C API Misc section.
Great Circle Distance
FastH3.greatCircleDistanceRads — Function
greatCircleDistanceRads(a::LatLng, b::LatLng) -> Float64Compute the great circle distance in radians between two points using the Haversine formula.
See also the H3 C API: greatCircleDistanceRads
FastH3.greatCircleDistanceKm — Function
greatCircleDistanceKm(a::LatLng, b::LatLng) -> Float64Compute the great circle distance in kilometers between two points.
See also the H3 C API: greatCircleDistanceKm
FastH3.greatCircleDistanceM — Function
greatCircleDistanceM(a::LatLng, b::LatLng) -> Float64Compute the great circle distance in meters between two points.
See also the H3 C API: greatCircleDistanceM
Unit Conversion
FastH3.degsToRads — Function
FastH3.radsToDegs — Function
Average Hexagon Area
FastH3.getHexagonAreaAvgKm2 — Function
getHexagonAreaAvgKm2(res::Int) -> (H3Error, Float64)Get the average hexagon area in square kilometers at the given resolution.
See also the H3 C API: getHexagonAreaAvgKm2
FastH3.getHexagonAreaAvgM2 — Function
getHexagonAreaAvgM2(res::Int) -> (H3Error, Float64)Get the average hexagon area in square meters at the given resolution.
See also the H3 C API: getHexagonAreaAvgM2
Average Edge Length
FastH3.getHexagonEdgeLengthAvgKm — Function
getHexagonEdgeLengthAvgKm(res::Int) -> (H3Error, Float64)Get the average hexagon edge length in kilometers at the given resolution.
See also the H3 C API: getHexagonEdgeLengthAvgKm
FastH3.getHexagonEdgeLengthAvgM — Function
getHexagonEdgeLengthAvgM(res::Int) -> (H3Error, Float64)Get the average hexagon edge length in meters at the given resolution.
See also the H3 C API: getHexagonEdgeLengthAvgM
Cell Count
FastH3.getNumCells — Function
getNumCells(res::Int) -> (H3Error, Int64)Get the total number of cells (hexagons and pentagons) at the given resolution.
See also the H3 C API: getNumCells
Exact Cell Area
FastH3.cellAreaRads2 — Function
cellAreaRads2(h::H3Index) -> (H3Error, Float64)Compute the exact area of a cell in steradians.
See also the H3 C API: cellAreaRads2
FastH3.cellAreaKm2 — Function
cellAreaKm2(h::H3Index) -> (H3Error, Float64)Compute the exact area of a cell in square kilometers.
See also the H3 C API: cellAreaKm2
FastH3.cellAreaM2 — Function
cellAreaM2(h::H3Index) -> (H3Error, Float64)Compute the exact area of a cell in square meters.
See also the H3 C API: cellAreaM2
Exact Edge Length
FastH3.edgeLengthRads — Function
edgeLengthRads(edge::H3Index) -> (H3Error, Float64)Compute the length of a directed edge in radians.
See also the H3 C API: edgeLengthRads
FastH3.edgeLengthKm — Function
edgeLengthKm(edge::H3Index) -> (H3Error, Float64)Compute the length of a directed edge in kilometers.
See also the H3 C API: edgeLengthKm
FastH3.edgeLengthM — Function
edgeLengthM(edge::H3Index) -> (H3Error, Float64)Compute the length of a directed edge in meters.
See also the H3 C API: edgeLengthM