Comparing version 5.0.4 to 5.1.0
@@ -49,6 +49,6 @@ 'use strict'; | ||
meta.featureEach(points, function (pt) { | ||
if (!pt.properties) pt.properties = {}; | ||
if (!pt.properties) { pt.properties = {}; } | ||
meta.featureEach(polygons, function (poly) { | ||
if (pt.properties[outField] === undefined) { | ||
if (booleanPointInPolygon(pt, poly)) pt.properties[outField] = poly.properties[field]; | ||
if (booleanPointInPolygon(pt, poly)) { pt.properties[outField] = poly.properties[field]; } | ||
} | ||
@@ -55,0 +55,0 @@ }); |
{ | ||
"name": "@turf/tag", | ||
"version": "5.0.4", | ||
"version": "5.1.0", | ||
"description": "turf tag module", | ||
"main": "main", | ||
"module": "index", | ||
"jsnext:main": "index", | ||
"main": "main.js", | ||
"module": "main.mjs", | ||
"types": "index.d.ts", | ||
@@ -12,3 +11,4 @@ "files": [ | ||
"index.d.ts", | ||
"main.js" | ||
"main.js", | ||
"main.mjs" | ||
], | ||
@@ -18,3 +18,4 @@ "scripts": { | ||
"test": "node -r @std/esm test.js", | ||
"bench": "node -r @std/esm bench.js" | ||
"bench": "node -r @std/esm bench.js", | ||
"docs": "node ../../scripts/generate-readmes" | ||
}, | ||
@@ -46,9 +47,10 @@ "repository": { | ||
"rollup": "*", | ||
"rollup-plugin-buble": "*", | ||
"tape": "*" | ||
}, | ||
"dependencies": { | ||
"@turf/boolean-point-in-polygon": "^5.0.4", | ||
"@turf/clone": "^5.0.4", | ||
"@turf/helpers": "^5.0.4", | ||
"@turf/meta": "^5.0.4" | ||
"@turf/boolean-point-in-polygon": "^5.1.0", | ||
"@turf/clone": "^5.1.0", | ||
"@turf/helpers": "^5.1.0", | ||
"@turf/meta": "^5.1.0" | ||
}, | ||
@@ -55,0 +57,0 @@ "@std/esm": { |
@@ -7,8 +7,8 @@ # @turf/tag | ||
Takes a set of [points](http://geojson.org/geojson-spec.html#point) and a set of [polygons](http://geojson.org/geojson-spec.html#polygon) and performs a spatial join. | ||
Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a set of [polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6) and performs a spatial join. | ||
**Parameters** | ||
- `points` **[FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects)<[Point](http://geojson.org/geojson-spec.html#point)>** input points | ||
- `polygons` **[FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects)<[Polygon](http://geojson.org/geojson-spec.html#polygon)>** input polygons | ||
- `points` **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)>** input points | ||
- `polygons` **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)>** input polygons | ||
- `field` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** property in `polygons` to add to joined {<Point>} features | ||
@@ -46,3 +46,3 @@ - `outField` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** property in `points` in which to store joined property from `polygons` | ||
Returns **[FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects)<[Point](http://geojson.org/geojson-spec.html#point)>** points with `containingPolyId` property containing values from `polyId` | ||
Returns **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)>** points with `containingPolyId` property containing values from `polyId` | ||
@@ -49,0 +49,0 @@ <!-- This file is automatically generated. Please don't edit it directly: |
10510
7
172
6
Updated@turf/clone@^5.1.0
Updated@turf/helpers@^5.1.0
Updated@turf/meta@^5.1.0