1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
var geometryArea = require.;
/**
* Takes one or more features and returns their area
* in square meters.
*
* @param {(Feature|FeatureCollection)} input input features
* @return {number} area in square meters
* @example
* var polygons = {
* "type": "FeatureCollection",
* "features": [
* {
* "type": "Feature",
* "properties": {},
* "geometry": {
* "type": "Polygon",
* "coordinates": [[
* [-67.031021, 10.458102],
* [-67.031021, 10.53372],
* [-66.929397, 10.53372],
* [-66.929397, 10.458102],
* [-67.031021, 10.458102]
* ]]
* }
* }, {
* "type": "Feature",
* "properties": {},
* "geometry": {
* "type": "Polygon",
* "coordinates": [[
* [-66.919784, 10.397325],
* [-66.919784, 10.513467],
* [-66.805114, 10.513467],
* [-66.805114, 10.397325],
* [-66.919784, 10.397325]
* ]]
* }
* }
* ]
* };
*
* var area = turf.area(polygons);
*
* //=area
*/
module.exports = area;