Crate h3ron_h3_sys

Source
Expand description

Low-level bindings to H3

This crate includes the C sources for libh3, so compiling it requires a C toolchain.

Modules§

geo

Structs§

CellBoundary
@struct CellBoundary @brief cell boundary in latitude/longitude
CoordIJ
@struct CoordIJ @brief IJ hexagon coordinates
GeoLoop
@struct GeoLoop @brief similar to CellBoundary, but requires more alloc work
GeoMultiPolygon
@struct GeoMultiPolygon @brief Simplified core of GeoJSON MultiPolygon coordinates definition
GeoPolygon
@struct GeoPolygon @brief Simplified core of GeoJSON Polygon coordinates definition
LatLng
@struct LatLng @brief latitude/longitude in radians
LinkedGeoLoop
LinkedGeoPolygon
LinkedLatLng

Functions§

areNeighborCells
@defgroup areNeighborCells areNeighborCells Functions for areNeighborCells @{ / /** @brief returns whether or not the provided hexagons border
cellAreaKm2
@brief exact area for a specific cell (hexagon or pentagon) in kilometers^2
cellAreaM2
@brief exact area for a specific cell (hexagon or pentagon) in meters^2
cellAreaRads2
@defgroup cellArea cellArea Functions for cellArea @{ / /** @brief exact area for a specific cell (hexagon or pentagon) in radians^2
cellToBoundary
@defgroup cellToBoundary cellToBoundary Functions for cellToBoundary @{ / /** @brief give the cell boundary in lat/lng coordinates for the cell h3
cellToCenterChild
@defgroup cellToCenterChild cellToCenterChild Functions for cellToCenterChild @{ / /** @brief returns the center child of the given cell at the specified resolution
cellToChildPos
@defgroup cellToChildPos cellToChildPos Functions for cellToChildPos @{ / /** @brief Returns the position of the cell within an ordered list of all children of the cell’s parent at the specified resolution
cellToChildren
@brief provides the children (or grandchildren, etc) of the given cell
cellToChildrenSize
@defgroup cellToChildren cellToChildren Functions for cellToChildren @{ / /** @brief determines the exact number of children (or grandchildren, etc) that would be returned for the given cell
cellToLatLng
@defgroup cellToLatLng cellToLatLng Functions for cellToLatLng @{ / /** @brief find the lat/lng center point g of the cell h3
cellToLocalIj
@defgroup cellToLocalIj cellToLocalIj Functions for cellToLocalIj @{ / /** @brief Returns two dimensional coordinates for the given index
cellToParent
@defgroup cellToParent cellToParent Functions for cellToParent @{ / /** @brief returns the parent (or grandparent, etc) cell of the given cell
cellToVertex
@defgroup cellToVertex cellToVertex Functions for cellToVertex @{ / /** @brief Returns a single vertex for a given cell, as an H3 index
cellToVertexes
@defgroup cellToVertexes cellToVertexes Functions for cellToVertexes @{ / /** @brief Returns all vertexes for a given cell, as H3 indexes
cellsToDirectedEdge
@defgroup cellsToDirectedEdge cellsToDirectedEdge Functions for cellsToDirectedEdge @{ / /** @brief returns the directed edge H3Index for the specified origin and destination
cellsToLinkedMultiPolygon
@defgroup cellsToMultiPolygon cellsToMultiPolygon Functions for cellsToMultiPolygon (currently a binding-only concept) @{ / /** @brief Create a LinkedGeoPolygon from a set of contiguous hexagons
childPosToCell
@defgroup childPosToCell childPosToCell Functions for childPosToCell @{ / /** @brief Returns the child cell at a given position within an ordered list of all children at the specified resolution
compactCells
@defgroup compactCells compactCells Functions for compactCells @{ / /** @brief compacts the given set of hexagons as best as possible
degsToRads
@defgroup degsToRads degsToRads Functions for degsToRads @{ / /** @brief converts degrees to radians
destroyLinkedMultiPolygon
@brief Free all memory created for a LinkedGeoPolygon
directedEdgeToBoundary
@defgroup directedEdgeToBoundary directedEdgeToBoundary Functions for directedEdgeToBoundary @{ / /** @brief Returns the CellBoundary containing the coordinates of the edge
directedEdgeToCells
@defgroup directedEdgeToCells
directedEdgeToCells Functions for directedEdgeToCells @{ / /** @brief Returns the origin and destination hexagons from the directed edge H3Index
edgeLengthKm
@brief exact length for a specific directed edge in kilometers
edgeLengthM
@brief exact length for a specific directed edge in meters
edgeLengthRads
@defgroup edgeLength edgeLength Functions for edgeLength @{ / /** @brief exact length for a specific directed edge in radians
getBaseCellNumber
@defgroup getBaseCellNumber getBaseCellNumber Functions for getBaseCellNumber @{ / /** @brief returns the base cell “number” (0 to 121) of the provided H3 cell
getDirectedEdgeDestination
@defgroup getDirectedEdgeDestination
getDirectedEdgeDestination Functions for getDirectedEdgeDestination @{ / /** @brief Returns the destination hexagon H3Index from the directed edge H3Index
getDirectedEdgeOrigin
@defgroup getDirectedEdgeOrigin
getDirectedEdgeOrigin Functions for getDirectedEdgeOrigin @{ / /** @brief Returns the origin hexagon H3Index from the directed edge H3Index
getHexagonAreaAvgKm2
@defgroup getHexagonAreaAvg getHexagonAreaAvg Functions for getHexagonAreaAvg @{ / /** @brief average hexagon area in square kilometers (excludes pentagons)
getHexagonAreaAvgM2
@brief average hexagon area in square meters (excludes pentagons)
getHexagonEdgeLengthAvgKm
@defgroup getHexagonEdgeLengthAvg getHexagonEdgeLengthAvg Functions for getHexagonEdgeLengthAvg @{ / /** @brief average hexagon edge length in kilometers (excludes pentagons)
getHexagonEdgeLengthAvgM
@brief average hexagon edge length in meters (excludes pentagons)
getIcosahedronFaces
@brief Find all icosahedron faces intersected by a given H3 index
getNumCells
@defgroup getNumCells getNumCells Functions for getNumCells @{ / /** @brief number of cells (hexagons and pentagons) for a given resolution
getPentagons
@brief generates all pentagons at the specified resolution
getRes0Cells
@brief provides all base cells in H3Index format
getResolution
@defgroup getResolution getResolution Functions for getResolution @{ / /** @brief returns the resolution of the provided H3 index Works on both cells and directed edges.
greatCircleDistanceKm
@brief “great circle distance” between pairs of LatLng points in kilometers
greatCircleDistanceM
@brief “great circle distance” between pairs of LatLng points in meters
greatCircleDistanceRads
@defgroup greatCircleDistance greatCircleDistance Functions for distance @{ / /** @brief “great circle distance” between pairs of LatLng points in radians
gridDisk
@brief hexagon neighbors in all directions
gridDiskDistances
@defgroup gridDiskDistances gridDiskDistances Functions for gridDiskDistances @{ / /** @brief hexagon neighbors in all directions, reporting distance from origin
gridDiskDistancesSafe
@brief hexagons neighbors in all directions reporting distance from origin
gridDiskDistancesUnsafe
@brief hexagons neighbors in all directions, assuming no pentagons, reporting distance from origin
gridDiskUnsafe
@brief hexagons neighbors in all directions, assuming no pentagons
gridDisksUnsafe
@brief collection of hex rings sorted by ring for all given hexagons
gridDistance
@defgroup gridDistance gridDistance Functions for gridDistance @{ / /** @brief Returns grid distance between two indexes
gridPathCells
@brief Line of h3 indexes connecting two indexes
gridPathCellsSize
@defgroup gridPathCells gridPathCells Functions for gridPathCells @{ / /** @brief Number of indexes in a line connecting two indexes
gridRingUnsafe
@defgroup gridRingUnsafe gridRingUnsafe Functions for gridRingUnsafe @{ / /** @brief hollow hexagon ring at some origin
h3ToString
@defgroup h3ToString h3ToString Functions for h3ToString @{ / /** @brief converts an H3Index to a canonical string
isPentagon
@defgroup isPentagon isPentagon Functions for isPentagon @{ / /** @brief determines if an H3 cell is a pentagon
isResClassIII
@defgroup isResClassIII isResClassIII Functions for isResClassIII @{ / /** @brief determines if a hexagon is Class III (or Class II)
isValidCell
@defgroup isValidCell isValidCell Functions for isValidCell @{ / /** @brief confirms if an H3Index is a valid cell (hexagon or pentagon) In particular, returns 0 (False) for H3 directed edges or invalid data
isValidDirectedEdge
@defgroup isValidDirectedEdge isValidDirectedEdge Functions for isValidDirectedEdge @{ / /** @brief returns whether the H3Index is a valid directed edge
isValidVertex
@defgroup isValidVertex isValidVertex Functions for isValidVertex @{ / /** @brief Whether the input is a valid H3 vertex
latLngToCell
@defgroup latLngToCell latLngToCell Functions for latLngToCell @{ / /** @brief find the H3 index of the resolution res cell containing the lat/lng
localIjToCell
@defgroup localIjToCell localIjToCell Functions for localIjToCell @{ / /** @brief Returns index for the given two dimensional coordinates
maxFaceCount
@defgroup getIcosahedronFaces getIcosahedronFaces Functions for getIcosahedronFaces @{ / /** @brief Max number of icosahedron faces intersected by an index
maxGridDiskSize
@defgroup gridDisk gridDisk Functions for gridDisk @{ / /** @brief maximum number of hexagons in k-ring
maxPolygonToCellsSize
@defgroup polygonToCells polygonToCells Functions for polygonToCells @{ / /** @brief maximum number of hexagons that could be in the geoloop
originToDirectedEdges
@defgroup originToDirectedEdges
originToDirectedEdges Functions for originToDirectedEdges @{ / /** @brief Returns the 6 (or 5 for pentagons) edges associated with the H3Index
pentagonCount
@defgroup getPentagons getPentagons Functions for getPentagons @{ / /** @brief returns the number of pentagons per resolution
polygonToCells
@brief hexagons within the given geopolygon
radsToDegs
@defgroup radsToDegs radsToDegs Functions for radsToDegs @{ / /** @brief converts radians to degrees
res0CellCount
@defgroup getRes0Cells getRes0Cells Functions for getRes0Cells @{ / /** @brief returns the number of resolution 0 cells (hexagons and pentagons)
stringToH3
@defgroup stringToH3 stringToH3 Functions for stringToH3 @{ / /** @brief converts the canonical string format to H3Index format
uncompactCells
@brief uncompacts the compacted hexagon set
uncompactCellsSize
@defgroup uncompactCells uncompactCells Functions for uncompactCells @{ / /** @brief determines the exact number of hexagons that will be uncompacted from the compacted set
vertexToLatLng
@defgroup vertexToLatLng vertexToLatLng Functions for vertexToLatLng @{ / /** @brief Returns a single vertex for a given cell, as an H3 index

Type Aliases§

H3Error
@brief Result code (success or specific error) from an H3 operation
H3Index
@brief Identifier for an object (cell, edge, etc) in the H3 system.