turf-remove

1.0.1 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    38
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    38
  • 1.0.0
    0
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i turf-remove

Weekly Downloads

38

Version

1.0.1

License

MIT

Last publish

Collaborators

  • tcql
  • morganherlocker
  • mourner
  • jvrousseau
  • jseppi
  • cspanring
  • cwmma
  • lyzidiamond
  • tmcw