New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@turf/idw

Package Overview
Dependencies
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/idw - npm Package Compare versions

Comparing version

to
3.10.2

test/in/data.geojson

3

index.d.ts
/// <reference types="geojson" />
import {Units} from '@turf/helpers'

@@ -9,4 +10,4 @@ type Points = GeoJSON.FeatureCollection<GeoJSON.Point>;

*/
declare function idw(controlPoints: Points, valueField: string, b: number, cellWidth: boolean, units?: string): Polygons;
declare function idw(controlPoints: Points, valueField: string, b: number, cellWidth: number, units?: Units): Polygons;
declare namespace idw { }
export = idw;

@@ -0,0 +0,0 @@ var distance = require('@turf/distance');

{
"name": "@turf/idw",
"version": "3.10.0",
"version": "3.10.2",
"description": "Calculate a grid with IDW - Inverse Distance Weighted - values.",

@@ -10,6 +10,7 @@ "main": "index.js",

"dependencies": {
"@turf/bbox": "^3.10.0",
"@turf/centroid": "^3.10.0",
"@turf/distance": "^3.10.0",
"@turf/bbox": "^3.10.0",
"@turf/square-grid": "^3.10.0"
"@turf/helpers": "^3.10.0",
"@turf/square-grid": "^3.10.2"
},

@@ -16,0 +17,0 @@ "devDependencies": {

@@ -0,0 +0,0 @@ # @turf/idw

@@ -6,7 +6,7 @@ var test = require('tape');

test('idw', function (t) {
var testPoints = JSON.parse(fs.readFileSync('./data/data.geojson'));
var testPoints = JSON.parse(fs.readFileSync('./test/in/data.geojson'));
var idw1 = idw(testPoints,'value' , 0.5 , 1, 'kilometers');
var idw2 = idw(testPoints,'value', 0.5 ,0.5, 'kilometers');
var idw3 = idw(testPoints,'value', 2 , 1, 'miles');
var idw1 = idw(testPoints, 'value', 0.5, 1, 'kilometers');
var idw2 = idw(testPoints, 'value', 0.5, 0.5, 'kilometers');
var idw3 = idw(testPoints, 'value', 2, 1, 'miles');
var idw4 = idw(testPoints, 'WRONGDataField', 0.5, 1, 'miles');

@@ -19,6 +19,6 @@

if (process.env.UPDATE) {
fs.writeFileSync(__dirname+'/tests/idw1.geojson', JSON.stringify(idw1,null,2));
fs.writeFileSync(__dirname+'/tests/idw2.geojson', JSON.stringify(idw2,null,2));
fs.writeFileSync(__dirname+'/tests/idw3.geojson', JSON.stringify(idw3,null,2));
if (process.env.REGEN) {
fs.writeFileSync(__dirname + '/test/out/idw1.geojson', JSON.stringify(idw1, null, 2));
fs.writeFileSync(__dirname + '/test/out/idw2.geojson', JSON.stringify(idw2, null, 2));
fs.writeFileSync(__dirname + '/test/out/idw3.geojson', JSON.stringify(idw3, null, 2));
}

@@ -25,0 +25,0 @@

Sorry, the diff of this file is not supported yet