Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/points-within-polygon

Package Overview
Dependencies
Maintainers
7
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/points-within-polygon - npm Package Compare versions

Comparing version 6.5.0 to 7.0.0-alpha.0

2

dist/es/index.js

@@ -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]&lt;[Point][5]>)** Points as input search
- `polygons` **([FeatureCollection][4] \| [Geometry][6] \| [Feature][3]&lt;([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]&lt;[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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc