These functions include descriptions of the H3 grid system.
decimal Api.DegsToRads(decimal degrees)
Converts degrees to radians.
Name | Type | Description |
---|---|---|
degrees | decimal | Degree to change to radians |
decimal Api.RadsToDegs(decimal radians)
Converts radians to degrees.
Name | Type | Description |
---|---|---|
radians | decimal | Radians to change to degrees |
decimal Api.HexAreaKm2(int r)
Average hexagon area in square kilometers at the given resolution.
Name | Type | Description |
---|---|---|
r | int | Resolution to find average of |
decimal Api.HexAreaM2(int r)
Average hexagon area in square meters at the given resolution.
Name | Type | Description |
---|---|---|
r | int | Resolution to find average of |
decimal Api.CellAreaKm2(H3Index h)
Exact area of specific cell in square kilometers.
Name | Type | Description |
---|---|---|
h | H3Lib.H3Index | Cell to find area of |
decimal Api.CellAreaM2(H3Index h)
Exact area of specific cell in square meters.
Name | Type | Description |
---|---|---|
h | H3Lib.H3Index | Cell to find area of |
decimal Api.CellAreaRads2(H3Index h)
Exact area of specific cell in square radians.
Name | Type | Description |
---|---|---|
h | H3Lib.H3Index | Cell to find area of |
decimal Api.EdgeLengthKm(int r)
Average hexagon edge length in kilometers at the given resolution.
Name | Type | Description |
---|---|---|
r | int | Resolution |
decimal Api.EdgeLengthM(int r)
Average hexagon edge length in meters at the given resolution.
Name | Type | Description |
---|---|---|
r | int | Resolution |
decimal Api.ExactEdgeLengthKm(H3Index edge)
Exact edge length of specific unidirectional edge in kilometers.
Name | Type | Description |
---|---|---|
edge | H3Lib.H3Index | Unidirecitonal edge to measure |
decimal Api.ExactEdgeLengthM(H3Index edge)
Exact edge length of specific unidirectional edge in meters.
Name | Type | Description |
---|---|---|
edge | H3Lib.H3Index | Unidirecitonal edge to measure |
decimal Api.ExactEdgeLengthRads(H3Index edge)
Exact edge length of specific unidirectional edge in radians.
Name | Type | Description |
---|---|---|
edge | H3Lib.H3Index | Unidirecitonal edge to measure |
long Api.NumHexagons(int r)
Number of unique H3 indexes at the given resolution.
Name | Type | Description |
---|---|---|
r | int | Resolution to count cells of |
void Api.GetRes0Indexes(out List<H3Index> outCells)
All the resolution 0 H3 indexes. out must be an array of at least size res0IndexCount().
Name | Type | Description |
---|---|---|
outCells | out List<H3Lib.H3Index> | Cells of resolution 0 |
int Api.Res0IndexCount()
Number of resolution 0 H3 indexes.
void Api.GetPentagonIndexes(int r, out List<H3Index> outCells)
All the pentagon H3 indexes at the specified resolution.
Name | Type | Description |
---|---|---|
r | int | Resolution of pentagons |
outCells | out List<H3Lib.H3Index> | List of pentagons |
int Api.PentagonIndexCount()
Number of pentagon H3 indexes per resolution. This is always 12, but provided as a convenience.
decimal Api.PointDistKm(GeoCoord a, GeoCoord b)
Gives the "great circle" or "haversine" distance between pairs of GeoCoord points (lat/lng pairs) in kilometers.
Name | Type | Description |
---|---|---|
a | H3Lib.GeoCoord | Point A |
b | H3Lib.GeoCoord | Point B |
decimal Api.PointDistM(GeoCoord a, GeoCoord b)
Gives the "great circle" or "haversine" distance between pairs of GeoCoord points (lat/lng pairs) in meters.
Name | Type | Description |
---|---|---|
a | H3Lib.GeoCoord | Point A |
b | H3Lib.GeoCoord | Point B |
decimal Api.PointDistRads(GeoCoord a, GeoCoord b)
Gives the "great circle" or "haversine" distance between pairs of GeoCoord points (lat/lng pairs) in radians.
Name | Type | Description |
---|---|---|
a | H3Lib.GeoCoord | Point A |
b | H3Lib.GeoCoord | Point B |