Comparing version 0.0.90 to 0.0.91
@@ -51,3 +51,3 @@ var _ = require('lodash') | ||
case 'count': | ||
t.count(polygons, points, agg.inField, agg.outField, function(err, counted){ | ||
t.count(polygons, points, agg.outField, function(err, counted){ | ||
polygons = counted | ||
@@ -54,0 +54,0 @@ }) |
@@ -5,3 +5,3 @@ var t = {} | ||
module.exports = function(polyFC, ptFC, inField, outField, done){ | ||
module.exports = function(polyFC, ptFC, outField, done){ | ||
_.each(polyFC.features, function(poly){ | ||
@@ -15,3 +15,3 @@ if(!poly.properties){ | ||
if(isInside){ | ||
values.push(pt.properties[inField]) | ||
values.push(1) | ||
} | ||
@@ -18,0 +18,0 @@ }) |
{ | ||
"name": "turf", | ||
"version": "0.0.90", | ||
"version": "0.0.91", | ||
"description": "a node.js library for performing geospatial operations with geojson", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -914,3 +914,3 @@ turf | ||
Takes a set of polygons, a set of points, and an array of aggregations, then perform them. Sum, average, min, max, and deviation are supported. | ||
Takes a set of polygons, a set of points, and an array of aggregations, then perform them. Sum, average, count, min, max, and deviation are supported. | ||
@@ -964,2 +964,7 @@ ```javascript | ||
outField: 'pop_variance' | ||
}, | ||
{ | ||
aggregation: 'count', | ||
inField: '', | ||
outField: 'point_count' | ||
} | ||
@@ -966,0 +971,0 @@ ] |
@@ -53,3 +53,3 @@ var t = require('../index'), | ||
aggregation: 'count', | ||
inField: '*', | ||
inField: '', | ||
outField: 'point_count' | ||
@@ -56,0 +56,0 @@ } |
@@ -20,4 +20,4 @@ var t = require('../index'), | ||
counted.features.should.be.ok | ||
counted.features[0].properties.population_count.should.equal(2) | ||
counted.features[1].properties.population_count.should.equal(3) | ||
counted.features[0].properties.point_count.should.equal(2) | ||
counted.features[1].properties.point_count.should.equal(3) | ||
done() | ||
@@ -24,0 +24,0 @@ }) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1040
3464741