turf-sum
turf sum module
turf.sum(polygons, points, inField, outField)
Calculates the sum of a field for Point features within a set of Polygon features.
Parameters
parameter | type | description |
---|---|---|
polygons |
FeatureCollection | a FeatureCollection of Polygon features |
points |
FeatureCollection | a FeatureCollection of Point features |
inField |
String | the field in input data to analyze |
outField |
String | the field in which to store results |
Example
var polygons = turf;var points = turf; var aggregated = turf; var result = turf; //=result
Installation
Requires nodejs.
$ npm install turf-sum
Tests
$ npm test