@turf/points-within-polygon
Advanced tools
Comparing version 6.5.0 to 7.0.0-alpha.0
@@ -62,3 +62,3 @@ import pointInPolygon from '@turf/boolean-point-in-polygon'; | ||
if (contained) { | ||
results.push(multiPoint(pointsWithin)); | ||
results.push(multiPoint(pointsWithin, point.properties || {})); | ||
} | ||
@@ -65,0 +65,0 @@ } else { |
@@ -68,3 +68,3 @@ 'use strict'; | ||
if (contained) { | ||
results.push(helpers.multiPoint(pointsWithin)); | ||
results.push(helpers.multiPoint(pointsWithin, point.properties || {})); | ||
} | ||
@@ -71,0 +71,0 @@ } else { |
@@ -8,4 +8,4 @@ import { | ||
Point, | ||
Properties, | ||
} from "@turf/helpers"; | ||
GeoJsonProperties, | ||
} from "geojson"; | ||
@@ -18,3 +18,3 @@ /** | ||
G extends Polygon | MultiPolygon, | ||
P = Properties | ||
P = GeoJsonProperties | ||
>( | ||
@@ -21,0 +21,0 @@ points: Feature<F, P> | FeatureCollection<F, P>, |
{ | ||
"name": "@turf/points-within-polygon", | ||
"version": "6.5.0", | ||
"version": "7.0.0-alpha.0", | ||
"description": "turf points-within-polygon module", | ||
@@ -47,3 +47,3 @@ "author": "Turf Authors", | ||
"test:tape": "node -r esm test.js", | ||
"test:types": "tsc --esModuleInterop --noEmit types.ts" | ||
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" | ||
}, | ||
@@ -57,7 +57,7 @@ "devDependencies": { | ||
"dependencies": { | ||
"@turf/boolean-point-in-polygon": "^6.5.0", | ||
"@turf/helpers": "^6.5.0", | ||
"@turf/meta": "^6.5.0" | ||
"@turf/boolean-point-in-polygon": "^7.0.0-alpha.0", | ||
"@turf/helpers": "^7.0.0-alpha.0", | ||
"@turf/meta": "^7.0.0-alpha.0" | ||
}, | ||
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e" | ||
"gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189" | ||
} |
@@ -7,10 +7,10 @@ # @turf/points-within-polygon | ||
Finds [Points][1] that fall within [(Multi)Polygon(s)][2]. | ||
Finds [Points][1] or [MultiPoint][2] coordinate positions that fall within [(Multi)Polygon(s)][3]. | ||
**Parameters** | ||
### Parameters | ||
- `points` **([Feature][3] \| [FeatureCollection][4]<[Point][5]>)** Points as input search | ||
- `polygons` **([FeatureCollection][4] \| [Geometry][6] \| [Feature][3]<([Polygon][7] \| [MultiPolygon][8])>)** Points must be within these (Multi)Polygon(s) | ||
* `points` **([Feature][4] | [FeatureCollection][5]<([Point][6] | [MultiPoint][7])>)** Point(s) or MultiPoint(s) as input search | ||
* `polygons` **([FeatureCollection][5] | [Geometry][8] | [Feature][4]<([Polygon][9] | [MultiPolygon][10])>)** (Multi)Polygon(s) to check if points are within | ||
**Examples** | ||
### Examples | ||
@@ -46,20 +46,24 @@ ```javascript | ||
Returns **[FeatureCollection][4]<[Point][5]>** points that land within at least one polygon | ||
Returns **[FeatureCollection][5]<([Point][6] | [MultiPoint][7])>** Point(s) or MultiPoint(s) with positions that land within at least one polygon. The geometry type will match what was passsed in | ||
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2 | ||
[2]: https://tools.ietf.org/html/rfc7946#section-3.1.6 | ||
[2]: https://tools.ietf.org/html/rfc7946#section-3.1.3 | ||
[3]: https://tools.ietf.org/html/rfc7946#section-3.2 | ||
[3]: https://tools.ietf.org/html/rfc7946#section-3.1.6 | ||
[4]: https://tools.ietf.org/html/rfc7946#section-3.3 | ||
[4]: https://tools.ietf.org/html/rfc7946#section-3.2 | ||
[5]: https://tools.ietf.org/html/rfc7946#section-3.1.2 | ||
[5]: https://tools.ietf.org/html/rfc7946#section-3.3 | ||
[6]: https://tools.ietf.org/html/rfc7946#section-3.1 | ||
[6]: https://tools.ietf.org/html/rfc7946#section-3.1.2 | ||
[7]: https://tools.ietf.org/html/rfc7946#section-3.1.6 | ||
[7]: https://tools.ietf.org/html/rfc7946#section-3.1.3 | ||
[8]: https://tools.ietf.org/html/rfc7946#section-3.1.7 | ||
[8]: https://tools.ietf.org/html/rfc7946#section-3.1 | ||
[9]: https://tools.ietf.org/html/rfc7946#section-3.1.6 | ||
[10]: https://tools.ietf.org/html/rfc7946#section-3.1.7 | ||
<!-- This file is automatically generated. Please don't edit it directly: | ||
@@ -66,0 +70,0 @@ if you find an error, edit the source file (likely index.js), and re-run |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10980
91
1
+ Added@turf/boolean-point-in-polygon@7.1.0(transitive)
+ Added@turf/helpers@7.1.0(transitive)
+ Added@turf/invariant@7.1.0(transitive)
+ Added@turf/meta@7.1.0(transitive)
+ Added@types/geojson@7946.0.15(transitive)
+ Addedpoint-in-polygon-hao@1.2.4(transitive)
+ Addedrobust-predicates@3.0.2(transitive)
+ Addedtslib@2.8.1(transitive)
- Removed@turf/boolean-point-in-polygon@6.5.0(transitive)
- Removed@turf/helpers@6.5.0(transitive)
- Removed@turf/invariant@6.5.0(transitive)
- Removed@turf/meta@6.5.0(transitive)
Updated@turf/helpers@^7.0.0-alpha.0
Updated@turf/meta@^7.0.0-alpha.0