3.0.12 • Published 8 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
8 years ago
3.0.10
8 years ago
3.0.7-canary.ae89c8b3
8 years ago
3.0.5
8 years ago
3.0.1
8 years ago
3.0.0-canary.7879bf6c
8 years ago
3.0.0-canary.2f5f7167
8 years ago
1.0.1
9 years ago
1.0.0
9 years ago
0.1.2
10 years ago
0.1.1
10 years ago
0.1.0
10 years ago