function h3ToFeature()

in src/geojson2h3.js [151:163]


function h3ToFeature(h3Index, properties = {}) {
    // Wrap in an array for a single-loop polygon
    const coordinates = [h3.h3ToGeoBoundary(h3Index, true)];
    return {
        type: FEATURE,
        id: h3Index,
        properties,
        geometry: {
            type: POLYGON,
            coordinates
        }
    };
}