Hive state v0.0.1 Hive.H3 View Source
Interfaces with Erlang H3 and provides abstraction
layer to work with vehicles or %GeoPosition{}.
Usage
iex> Hive.H3.num_hexagons(resolution)
Link to this section Summary
Functions
Convert string representation of H3 index to numeric index value.
Returns the resolution of the index.
Indexes the location for given vehicle_id at the specified resolution
Returns index from %GeoPosition{}
Returns the %GeoPosition{} center of the cell
from numeric index
Get all hexagons in a k-ring around a given center and a distance.
Check if given index represents a pentagonal cell
Returns bounds for index
Convert string representation of H3 index to numeric index value.
Link to this section Types
resolution()
View Sourceresolution() :: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15
Link to this section Functions
Convert string representation of H3 index to numeric index value.
Example:
iex> Hive.H3.from_string("8928308280fffff")
Returns the resolution of the index.
index(vehicle_id, resolution)
View Sourceindex(Hive.GeoPosition.t(), resolution()) :: h3_index()
index(vehicle_id(), resolution()) :: h3_index()
Indexes the location for given vehicle_id at the specified resolution
index_from_geo(position, resolution)
View Sourceindex_from_geo(Hive.GeoPosition.t(), resolution()) :: h3_index()
Returns index from %GeoPosition{}
Returns the %GeoPosition{} center of the cell
from numeric index
k_ring(index, distance)
View Sourcek_ring(binary(), non_neg_integer()) :: [h3_index()]
k_ring(h3_index(), non_neg_integer()) :: [h3_index()]
Get all hexagons in a k-ring around a given center and a distance.
Check if given index represents a pentagonal cell
Returns bounds for index
Convert string representation of H3 index to numeric index value.
Example:
iex> Hive.H3.to_string(617_700_169_958_293_503)