turf-sample

turf sample module

Turf packages are now namespaced: please use @turf/sample instead
Last updated 4 years ago by tmcw .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install turf-sample 
SYNC missed versions from official npm registry.

turf-sample

build status

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

Current Tags

  • 3.0.7-canary.ae89c8b3                                ...           canary (4 years ago)
  • 3.0.12                                ...           latest (4 years ago)

12 Versions

  • 3.0.12 [deprecated]           ...           4 years ago
  • 3.0.10 [deprecated]           ...           4 years ago
  • 3.0.7-canary.ae89c8b3                                ...           4 years ago
  • 3.0.5 [deprecated]           ...           5 years ago
  • 3.0.1 [deprecated]           ...           5 years ago
  • 3.0.0-canary.7879bf6c                                ...           5 years ago
  • 3.0.0-canary.2f5f7167                                ...           5 years ago
  • 1.0.1 [deprecated]           ...           6 years ago
  • 1.0.0 [deprecated]           ...           6 years ago
  • 0.1.2 [deprecated]           ...           6 years ago
  • 0.1.1 [deprecated]           ...           6 years ago
  • 0.1.0 [deprecated]           ...           7 years ago
Downloads
Today 31
This Week 64
This Month 31
Last Day 33
Last Week 197
Last Month 820
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |