H3 class abstract

Provides access to H3 functions.

Constructors

H3()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cellArea(BigInt h3Index, H3Units unit) double
Calculates exact area of a given cell in square units (e.g. m^2)
compact(List<BigInt> hexagons) List<BigInt>
Compact a set of hexagons of the same resolution into a set of hexagons across multiple levels that represents the same area.
degsToRads(double val) double
Converts degrees to radians
edgeLength(int res, H3EdgeLengthUnits unit) double
Calculates average hexagon edge length at a given resolution in units
exactEdgeLength(BigInt edgeIndex, H3Units unit) double
Calculates exact length of a given unidirectional edge in units
experimentalH3ToLocalIj(BigInt origin, BigInt destination) CoordIJ
Produces IJ coordinates for an H3 index anchored by an origin.
experimentalLocalIjToH3(BigInt origin, CoordIJ coordinates) BigInt
Produces an H3 index for IJ coordinates anchored by an origin.
geoToH3(GeoCoord geoCoord, int res) BigInt
Find the H3 index of the resolution res cell containing the lat/lng
getDestinationH3IndexFromUnidirectionalEdge(BigInt edgeIndex) BigInt
Get the destination hexagon from an H3 index representing a unidirectional edge
getH3IndexesFromUnidirectionalEdge(BigInt edgeIndex) List<BigInt>
Get the origin, destination pair represented by a unidirectional edge
getH3UnidirectionalEdge(BigInt origin, BigInt destination) BigInt
Get an H3 index representing a unidirectional edge for a given origin and destination
getH3UnidirectionalEdgeBoundary(BigInt edgeIndex) List<GeoCoord>
Get the vertices of a given edge as an array of lat, lng points. Note that for edges that cross the edge of an icosahedron face, this may return 3 coordinates.
getH3UnidirectionalEdgesFromHexagon(BigInt edgeIndex) List<BigInt>
Get all of the unidirectional edges with the given H3 index as the origin (i.e. an edge to every neighbor)
getOriginH3IndexFromUnidirectionalEdge(BigInt edgeIndex) BigInt
Get the origin hexagon from an H3 index representing a unidirectional edge
getPentagonIndexes(int res) List<BigInt>
Get the twelve pentagon indexes at a given resolution.
getRes0Indexes() List<BigInt>
Returns all H3 indexes at resolution 0. As every index at every resolution > 0 is the descendant of a res 0 index, this can be used with h3ToChildren to iterate over H3 indexes at any resolution.
h3Distance(BigInt origin, BigInt destination) int
Get the grid distance between two hex indexes. This function may fail to find the distance between two indexes if they are very far apart or on opposite sides of a pentagon.
h3GetBaseCell(BigInt h3Index) int
Returns the base cell "number" (0 to 121) of the provided H3 cell
h3GetFaces(BigInt h3Index) List<int>
Find all icosahedron faces intersected by a given H3 index
h3GetResolution(BigInt h3Index) int
Returns the resolution of the provided H3 index
h3IndexesAreNeighbors(BigInt origin, BigInt destination) bool
Returns whether or not two H3 indexes are neighbors (share an edge)
h3IsPentagon(BigInt h3Index) bool
Determines if h3Index is a valid pentagon
h3IsResClassIII(BigInt h3Index) bool
Determines if h3Index is Class III (rotated versus the icosahedron and subject to shape distortion adding extra points on icosahedron edges, making them not true hexagons).
h3IsValid(BigInt h3Index) bool
Determines if h3Index is a valid cell (hexagon or pentagon)
h3Line(BigInt origin, BigInt destination) List<BigInt>
Given two H3 indexes, return the line of indexes between them (inclusive).
h3ToCenterChild(BigInt h3Index, int resolution) BigInt
Get the center child of the given h3Index hexagon at a particular resolution
h3ToChildren(BigInt h3Index, int resolution) List<BigInt>
Get the children/descendents of the given h3Index hexagon at a particular resolution
h3ToGeo(BigInt h3Index) GeoCoord
Find the lat/lon center point g of the cell h3
h3ToGeoBoundary(BigInt h3Index) List<GeoCoord>
Gives the cell boundary in lat/lon coordinates for the cell with index h3Index
h3ToParent(BigInt h3Index, int resolution) BigInt
Get the parent of the given h3Index hexagon at a particular resolution
h3UnidirectionalEdgeIsValid(BigInt edgeIndex) bool
Returns whether or not the input is a valid unidirectional edge
hexArea(int res, H3AreaUnits unit) double
Calculates average hexagon area at a given resolution in units
hexRing(BigInt h3Index, int ringSize) List<BigInt>
Hollow hexagon ring at some origin
kRing(BigInt h3Index, int ringSize) List<BigInt>
Maximum number of hexagons in k-ring
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numHexagons(int res) int
Returns the total count of hexagons in the world at a given resolution.
pointDist(GeoCoord a, GeoCoord b, H3Units unit) double
Calculates great circle distance between two geo points.
polyfill({required List<GeoCoord> coordinates, required int resolution, List<List<GeoCoord>> holes}) List<BigInt>
Takes a given coordinates and resolution and returns hexagons that are contained by them.
radsToDegs(double val) double
Converts radians to degrees
toString() String
A string representation of this object.
inherited
uncompact(List<BigInt> compactedHexagons, {required int resolution}) List<BigInt>
Uncompact a compacted set of hexagons to hexagons of the same resolution

Operators

operator ==(Object other) bool
The equality operator.
inherited