JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15101
  • Score
    100M100P100Q118495F
  • License ISC

calculate the area of a polygon or multipolygon feature

Package Exports

  • turf-area

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (turf-area) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

turf-area

build status

calculate the area of a polygon or multipolygon feature

turf.area(input)

Given any kind of GeoJSON feature, return the area of that feature, in square meters.

Parameters

parameter type description
input GeoJSON

Example

var polygons = turf.featurecollection([
  turf.polygon([[[0,0],[10,0],[10,10],[0,10],[0,0]]]),
  turf.polygon([[[10,0],[20,10],[20,20], [20,0]]])]);
var area = turf.area(polygons);
//=area

Installation

Requires nodejs.

$ npm install turf-area

Tests

$ npm test