3.0.12 • Published 9 years ago
turf-sample v3.0.12
turf-sample
turf sample module
turf.sample(features, n)
Selects a given number of Feature|features from a FeatureCollection at random.
Parameters
parameter | type | description |
---|---|---|
features | FeatureCollection | |
n | number | number of features to select |
Example
// create a lot of points
var points = turf.random('points', 1000);
//=points
// sample just a few of them
var sample = turf.sample(points, 10);
//=sample
Installation
Requires nodejs.
$ npm install turf-sample
Tests
$ npm test
3.0.12
9 years ago
3.0.10
9 years ago
3.0.7-canary.ae89c8b3
9 years ago
3.0.5
9 years ago
3.0.1
9 years ago
3.0.0-canary.7879bf6c
9 years ago
3.0.0-canary.2f5f7167
9 years ago
1.0.1
10 years ago
1.0.0
11 years ago
0.1.2
11 years ago
0.1.1
11 years ago
0.1.0
11 years ago