h3-polyfill
h3-polyfill
is a library and a command line interface to Uber h3 polyfill.
It takes an input polygon as a GeoJSON file and outputs hex as a GeoJSON polygon feature collection.
Installation
npm i h3-polyfill
Usage
const h3Polyfill = ; const polygon = type: "Feature" properties: {} geometry: type: "Polygon" coordinates: -12240898669999721 3781331899998324 -12235447369999936 3771980619999785 -1224798767000009 37815157199999845 -12240898669999721 3781331899998324 ; const hex = ;
CLI Usage
Usage: h3-polyfill <polygon.geojson> <resolution>
Example:
npx h3-polyfill polygon.geojson 7 > hex.geojson