How to use the h3-js.uncompact function in h3-js

To help you get started, we’ve selected a few h3-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uber / geojson2h3 / test / geojson2h3.spec.js View on Github external
coordinates: [
                [
                    vertices[2],
                    vertices[3],
                    vertices[4],
                    vertices[5],
                    vertices[0],
                    vertices[1],
                    vertices[2]
                ]
            ]
        }
    };
    const resolution = 10;

    const expected = h3.uncompact([parentHex], resolution).sort();

    assert.equal(expected.length, 7, 'Got expected child hexagons');

    assert.deepEqual(
        featureToH3Set(feature, resolution).sort(),
        expected,
        'featureToH3Set matches expected'
    );

    assert.end();
});

h3-js

Pure-Javascript version of the H3 library, a hexagon-based geographic grid system

Apache-2.0
Latest version published 2 years ago

Package Health Score

65 / 100
Full package analysis