开发者社区> 镜像站> NPM> turf-remove
turf-remove
turf remove module
Last updated 6 years ago by morganherlocker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install turf-remove 
SYNC missed versions from official npm registry.

turf-remove

build status

turf remove module

turf.remove(features, property, value)

Takes a FeatureCollection, a property, and a value and returns a FeatureCollection with features matching that property-value pair removed.

Parameters

parameter type description
features FeatureCollection a FeatureCollection of any type
property String the property to filter
value String the value to filter

Example

var points = turf.featurecollection([
 turf.point([-0.235004, 5.551918], {'marker-color': '#00f'}),
 turf.point([-0.209598, 5.56439], {'marker-color': '#f00'}),
 turf.point([-0.197753, 5.556018], {'marker-color': '#00f'}),
 turf.point([-0.217323, 5.549526], {'marker-color': '#000'}),
 turf.point([-0.211315, 5.543887], {'marker-color': '#0f0'}),
 turf.point([-0.202217, 5.547134], {'marker-color': '#00f'}),
 turf.point([-0.231227, 5.56644], {'marker-color': '#0f0'})
]);

//=points

var filtered = turf.remove(points, 'marker-color', '#00f');

//=filtered

Installation

Requires nodejs.

$ npm install turf-remove

Tests

$ npm test

Current Tags

  • 1.0.1                                ...           latest (6 years ago)

5 Versions

  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Downloads
Today 0
This Week 5
This Month 5
Last Day 0
Last Week 0
Last Month 5
Dependencies (1)
Dev Dependencies (5)
Dependents (1)