@turf/within
Advanced tools
Comparing version 4.5.2 to 4.6.0
80
index.js
@@ -12,64 +12,20 @@ var inside = require('@turf/inside'); | ||
* @example | ||
* var searchWithin = { | ||
* "type": "FeatureCollection", | ||
* "features": [ | ||
* { | ||
* "type": "Feature", | ||
* "properties": {}, | ||
* "geometry": { | ||
* "type": "Polygon", | ||
* "coordinates": [[ | ||
* [-46.653,-23.543], | ||
* [-46.634,-23.5346], | ||
* [-46.613,-23.543], | ||
* [-46.614,-23.559], | ||
* [-46.631,-23.567], | ||
* [-46.653,-23.560], | ||
* [-46.653,-23.543] | ||
* ]] | ||
* } | ||
* } | ||
* ] | ||
* }; | ||
* var points = { | ||
* "type": "FeatureCollection", | ||
* "features": [ | ||
* { | ||
* "type": "Feature", | ||
* "properties": {}, | ||
* "geometry": { | ||
* "type": "Point", | ||
* "coordinates": [-46.6318, -23.5523] | ||
* } | ||
* }, { | ||
* "type": "Feature", | ||
* "properties": {}, | ||
* "geometry": { | ||
* "type": "Point", | ||
* "coordinates": [-46.6246, -23.5325] | ||
* } | ||
* }, { | ||
* "type": "Feature", | ||
* "properties": {}, | ||
* "geometry": { | ||
* "type": "Point", | ||
* "coordinates": [-46.6062, -23.5513] | ||
* } | ||
* }, { | ||
* "type": "Feature", | ||
* "properties": {}, | ||
* "geometry": { | ||
* "type": "Point", | ||
* "coordinates": [-46.663, -23.554] | ||
* } | ||
* }, { | ||
* "type": "Feature", | ||
* "properties": {}, | ||
* "geometry": { | ||
* "type": "Point", | ||
* "coordinates": [-46.643, -23.557] | ||
* } | ||
* } | ||
* ] | ||
* }; | ||
* var searchWithin = turf.featureCollection([ | ||
* turf.polygon([[ | ||
* [-46.653,-23.543], | ||
* [-46.634,-23.5346], | ||
* [-46.613,-23.543], | ||
* [-46.614,-23.559], | ||
* [-46.631,-23.567], | ||
* [-46.653,-23.560], | ||
* [-46.653,-23.543] | ||
* ]]) | ||
* ]); | ||
* var points = turf.featureCollection([ | ||
* turf.point([-46.6318, -23.5523]), | ||
* turf.point([-46.6246, -23.5325]), | ||
* turf.point([-46.6062, -23.5513]), | ||
* turf.point([-46.663, -23.554]), | ||
* turf.point([-46.643, -23.557]) | ||
* ]); | ||
* | ||
@@ -76,0 +32,0 @@ * var ptsWithin = turf.within(points, searchWithin); |
{ | ||
"name": "@turf/within", | ||
"version": "4.5.2", | ||
"version": "4.6.0", | ||
"description": "turf within module", | ||
@@ -37,5 +37,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"@turf/helpers": "^4.5.2", | ||
"@turf/inside": "^4.5.2" | ||
"@turf/helpers": "^4.6.0", | ||
"@turf/inside": "^4.6.0" | ||
} | ||
} |
@@ -15,64 +15,20 @@ # @turf/within | ||
```javascript | ||
var searchWithin = { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [[ | ||
[-46.653,-23.543], | ||
[-46.634,-23.5346], | ||
[-46.613,-23.543], | ||
[-46.614,-23.559], | ||
[-46.631,-23.567], | ||
[-46.653,-23.560], | ||
[-46.653,-23.543] | ||
]] | ||
} | ||
} | ||
] | ||
}; | ||
var points = { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [-46.6318, -23.5523] | ||
} | ||
}, { | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [-46.6246, -23.5325] | ||
} | ||
}, { | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [-46.6062, -23.5513] | ||
} | ||
}, { | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [-46.663, -23.554] | ||
} | ||
}, { | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [-46.643, -23.557] | ||
} | ||
} | ||
] | ||
}; | ||
var searchWithin = turf.featureCollection([ | ||
turf.polygon([[ | ||
[-46.653,-23.543], | ||
[-46.634,-23.5346], | ||
[-46.613,-23.543], | ||
[-46.614,-23.559], | ||
[-46.631,-23.567], | ||
[-46.653,-23.560], | ||
[-46.653,-23.543] | ||
]]) | ||
]); | ||
var points = turf.featureCollection([ | ||
turf.point([-46.6318, -23.5523]), | ||
turf.point([-46.6246, -23.5325]), | ||
turf.point([-46.6062, -23.5513]), | ||
turf.point([-46.663, -23.554]), | ||
turf.point([-46.643, -23.557]) | ||
]); | ||
@@ -79,0 +35,0 @@ var ptsWithin = turf.within(points, searchWithin); |
6194
60
70
Updated@turf/helpers@^4.6.0
Updated@turf/inside@^4.6.0