Skip to content

Instantly share code, notes, and snippets.

@morganherlocker
Created July 11, 2016 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morganherlocker/52fb142e57dbb3e662c65ad8db3edde2 to your computer and use it in GitHub Desktop.
Save morganherlocker/52fb142e57dbb3e662c65ad8db3edde2 to your computer and use it in GitHub Desktop.
var pts = // my point featurecollection
var polys = // my poly featurecollection
pts.features = pts.features.filter(function(pt){
var isInside = false
polys.features.forEach(function(poly){
if(turf.inside(pt, poly)) isInside = true
})
return isInside
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment