3.0.12 • Published 9 years ago

turf-sample v3.0.12

Weekly downloads
11,354
License
MIT
Repository
github
Last release
9 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

9 years ago

3.0.10

10 years ago

3.0.5

10 years ago

3.0.1

10 years ago

1.0.1

11 years ago

1.0.0

11 years ago

0.1.2

11 years ago

0.1.1

12 years ago

0.1.0

12 years ago