How to use the @turf/meta.geomReduce function in @turf/meta

To help you get started, we’ve selected a few @turf/meta 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 Turfjs / turf / packages / turf-area / index.ts View on Github external
export default function area(geojson: Feature | FeatureCollection | Geometry) {
    return geomReduce(geojson, (value, geom) => {
        return value + calculateArea(geom);
    }, 0);
}