Build & Test codecov License: Apache 2.0

Geojson2H#

The geojson2h3 library includes a set of utilities for conversion between GeoJSON polygons and H3 hexagon indexes, using h3_dart or h3_flutter.
This is port of JavaScript library geojson2h3

// h3_flutter example
import `package:h3_flutter/h3_flutter.dart`;

final h3Factory = const H3Factory();
final h3 = h3Factory.load();
final geojson2h3 = Geojson2H3(h3);

final hexagon = BigInt.from(0x89283082837ffff);
final hexagonFeature = geojson2h3.h3ToFeature(hexagon);

Currently, the library is on early-stage and supports only 2 methods:

geojson2h3.h3ToFeature()
geojson2h3.h3SetToFeatureCollection()

You can find more info about them here

Libraries

geojson2h3