3.0.12 • Published 8 years ago

turf-sample v3.0.12

Weekly downloads
11,354
License
MIT
Repository
github
Last release
8 years ago

turf-sample

build status

turf sample module

turf.sample(features, n)

Selects a given number of Feature|features from a FeatureCollection at random.

Parameters

parametertypedescription
featuresFeatureCollection
nnumbernumber 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.5

8 years ago

3.0.1

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