New module proposal @turf/filter
See original GitHub issueNew module proposal @turf/filter
This module should return true/false
if the Feature should be filtered based on the GeoJSON properties.
This type of behavior is already being used in @turf/clusters
& @turf/dissolve
, this module would replace the filter
functionality within these two modules and act as a stand alone module with it’s own independent testing.
Could also call this module
@turf/boolean-filter
since the output will strictly be aboolean
.
How to use module
const {point} = require('@turf/helpers')
const filter = require('@turf/filter')
const pt = point([10, 20], {foo: 'bar'})
filter(pt, {foo: 'bar'})
//=true
filter(pt, {hello: 'world'})
//=false
Source code
Tests
Ref: https://github.com/Turfjs/turf/pull/907#issuecomment-324851611
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
REQUEST FOR PROPOSAL 2010-04 Heating and Air ...
(8) 20x20x2, (4) 16x20x2, (4) 20x25x2 filters ... its proposal and submitting a new sealed proposal that complies with the.
Read more >REQUEST FOR PROPOSALS - California Courts
Provide and deliver to Court replacement filters/medias. 3. Install Filters ... Latest date and time proposal may be submitted. February 24, 2014.
Read more >Best Practices for Operation and Maintenance of Photovoltaic ...
An entire row of modules can fail if one module is lost, and they are held ... a timeframe when the grass-cutting is...
Read more >PROPOSAL - NYSDOT
Proposal Description: Large Culvert Repairs/ Replacements on NY. Rtes. 98 & 353 in the Towns of Franklinville,. Great Valley & New Albion.
Read more >Training Module Narrative Detai
EARN Maryland Summer 2020 Solicitation for Implementation Grant Proposals ... Create new worksheets for each Training Module.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d rather not call this
filter
as I naturally would expect it to behave like Array.filter.I came here to suggest we implement the equivalent of the JS filter function.
along with map
The advantage of doing this with turf rather than straight JS is the corner cases of where GeoJSON is just one feature rather than a feature collection is abstracted.
interesting idea @DenisCarriere , some of those more extended uses could certainly be nifty