@turf/interpolate
Advanced tools
Comparing version 5.1.1 to 5.1.5
16
main.js
@@ -45,3 +45,3 @@ 'use strict'; | ||
options = options || {}; | ||
if (typeof options !== 'object') { throw new Error('options is invalid'); } | ||
if (typeof options !== 'object') throw new Error('options is invalid'); | ||
var gridType = options.gridType; | ||
@@ -52,6 +52,6 @@ var property = options.property; | ||
// validation | ||
if (!points) { throw new Error('points is required'); } | ||
if (!points) throw new Error('points is required'); | ||
invariant.collectionOf(points, 'Point', 'input must contain Points'); | ||
if (!cellSize) { throw new Error('cellSize is required'); } | ||
if (weight !== undefined && typeof weight !== 'number') { throw new Error('weight must be a number'); } | ||
if (!cellSize) throw new Error('cellSize is required'); | ||
if (weight !== undefined && typeof weight !== 'number') throw new Error('weight must be a number'); | ||
@@ -95,6 +95,6 @@ // default values | ||
// property has priority for zValue, fallbacks to 3rd coordinate from geometry | ||
if (property !== undefined) { zValue = point.properties[property]; } | ||
if (zValue === undefined) { zValue = point.geometry.coordinates[2]; } | ||
if (zValue === undefined) { throw new Error('zValue is missing'); } | ||
if (d === 0) { zw = zValue; } | ||
if (property !== undefined) zValue = point.properties[property]; | ||
if (zValue === undefined) zValue = point.geometry.coordinates[2]; | ||
if (zValue === undefined) throw new Error('zValue is missing'); | ||
if (d === 0) zw = zValue; | ||
var w = 1.0 / Math.pow(d, weight); | ||
@@ -101,0 +101,0 @@ sw += w; |
{ | ||
"name": "@turf/interpolate", | ||
"version": "5.1.1", | ||
"version": "5.1.5", | ||
"description": "turf interpolate module", | ||
"main": "main.js", | ||
"module": "main.mjs", | ||
"module": "main.es.js", | ||
"types": "index.d.ts", | ||
@@ -12,3 +12,3 @@ "files": [ | ||
"main.js", | ||
"main.mjs" | ||
"main.es.js" | ||
], | ||
@@ -18,2 +18,3 @@ "scripts": { | ||
"test": "node -r @std/esm test.js", | ||
"posttest": "node -r @std/esm ../../scripts/validate-es5-dependencies.js", | ||
"bench": "node -r @std/esm bench.js", | ||
@@ -42,3 +43,3 @@ "docs": "node ../../scripts/generate-readmes" | ||
"@std/esm": "*", | ||
"@turf/truncate": "^5.1.0", | ||
"@turf/truncate": "^5.1.5", | ||
"benchmark": "*", | ||
@@ -48,3 +49,2 @@ "chromatism": "*", | ||
"rollup": "*", | ||
"rollup-plugin-buble": "*", | ||
"tape": "*", | ||
@@ -54,13 +54,13 @@ "write-json-file": "*" | ||
"dependencies": { | ||
"@turf/bbox": "^5.1.0", | ||
"@turf/centroid": "^5.1.0", | ||
"@turf/clone": "^5.1.0", | ||
"@turf/distance": "^5.1.0", | ||
"@turf/helpers": "^5.1.0", | ||
"@turf/hex-grid": "^5.1.0", | ||
"@turf/invariant": "^5.1.0", | ||
"@turf/meta": "^5.1.0", | ||
"@turf/point-grid": "^5.1.0", | ||
"@turf/square-grid": "^5.1.1", | ||
"@turf/triangle-grid": "^5.1.0" | ||
"@turf/bbox": "^5.1.5", | ||
"@turf/centroid": "^5.1.5", | ||
"@turf/clone": "^5.1.5", | ||
"@turf/distance": "^5.1.5", | ||
"@turf/helpers": "^5.1.5", | ||
"@turf/hex-grid": "^5.1.5", | ||
"@turf/invariant": "^5.1.5", | ||
"@turf/meta": "^5.1.5", | ||
"@turf/point-grid": "^5.1.5", | ||
"@turf/square-grid": "^5.1.5", | ||
"@turf/triangle-grid": "^5.1.5" | ||
}, | ||
@@ -67,0 +67,0 @@ "@std/esm": { |
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
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
19534
8
Updated@turf/bbox@^5.1.5
Updated@turf/centroid@^5.1.5
Updated@turf/clone@^5.1.5
Updated@turf/distance@^5.1.5
Updated@turf/helpers@^5.1.5
Updated@turf/hex-grid@^5.1.5
Updated@turf/invariant@^5.1.5
Updated@turf/meta@^5.1.5
Updated@turf/point-grid@^5.1.5
Updated@turf/square-grid@^5.1.5
Updated@turf/triangle-grid@^5.1.5