@turf/isolines
Advanced tools
Comparing version 5.1.0 to 5.1.5
30
main.js
@@ -44,3 +44,3 @@ 'use strict'; | ||
if (settings.verbose) | ||
{ console.log('MarchingSquaresJS-isoContours: computing isocontour for ' + threshold); } | ||
console.log('MarchingSquaresJS-isoContours: computing isocontour for ' + threshold); | ||
@@ -50,3 +50,3 @@ var ret = contourGrid2Paths(computeContourGrid(data, threshold)); | ||
if (typeof settings.successCallback === 'function') | ||
{ settings.successCallback(ret); } | ||
settings.successCallback(ret); | ||
@@ -238,3 +238,3 @@ return ret; | ||
if (!merged) | ||
{ paths[path_idx++] = p.path; } | ||
paths[path_idx++] = p.path; | ||
} | ||
@@ -380,3 +380,3 @@ }); | ||
options = options || {}; | ||
if (!helpers.isObject(options)) { throw new Error('options is invalid'); } | ||
if (!helpers.isObject(options)) throw new Error('options is invalid'); | ||
var zProperty = options.zProperty || 'elevation'; | ||
@@ -400,6 +400,6 @@ var flip = options.flip; | ||
// Check if zProperty exist | ||
if (point.properties[zProperty]) { row.push(point.properties[zProperty]); } | ||
else { row.push(0); } | ||
if (point.properties[zProperty]) row.push(point.properties[zProperty]); | ||
else row.push(0); | ||
// add flags | ||
if (flags === true) { point.properties.matrixPosition = [r, c]; } | ||
if (flags === true) point.properties.matrixPosition = [r, c]; | ||
} | ||
@@ -426,3 +426,3 @@ matrix.push(row); | ||
var lat = invariant.getCoords(point)[1]; | ||
if (!pointsByLatitude[lat]) { pointsByLatitude[lat] = []; } | ||
if (!pointsByLatitude[lat]) pointsByLatitude[lat] = []; | ||
pointsByLatitude[lat].push(point); | ||
@@ -442,4 +442,4 @@ }); | ||
var pointMatrix = orderedRowsByLatitude.sort(function (a, b) { | ||
if (flip) { return invariant.getCoords(a[0])[1] - invariant.getCoords(b[0])[1]; } | ||
else { return invariant.getCoords(b[0])[1] - invariant.getCoords(a[0])[1]; } | ||
if (flip) return invariant.getCoords(a[0])[1] - invariant.getCoords(b[0])[1]; | ||
else return invariant.getCoords(b[0])[1] - invariant.getCoords(a[0])[1]; | ||
}); | ||
@@ -482,3 +482,3 @@ | ||
options = options || {}; | ||
if (!helpers.isObject(options)) { throw new Error('options is invalid'); } | ||
if (!helpers.isObject(options)) throw new Error('options is invalid'); | ||
var zProperty = options.zProperty || 'elevation'; | ||
@@ -490,6 +490,6 @@ var commonProperties = options.commonProperties || {}; | ||
invariant.collectionOf(pointGrid, 'Point', 'Input must contain Points'); | ||
if (!breaks) { throw new Error('breaks is required'); } | ||
if (!Array.isArray(breaks)) { throw new Error('breaks must be an Array'); } | ||
if (!helpers.isObject(commonProperties)) { throw new Error('commonProperties must be an Object'); } | ||
if (!Array.isArray(breaksProperties)) { throw new Error('breaksProperties must be an Array'); } | ||
if (!breaks) throw new Error('breaks is required'); | ||
if (!Array.isArray(breaks)) throw new Error('breaks must be an Array'); | ||
if (!helpers.isObject(commonProperties)) throw new Error('commonProperties must be an Object'); | ||
if (!Array.isArray(breaksProperties)) throw new Error('breaksProperties must be an Array'); | ||
@@ -496,0 +496,0 @@ // Isoline methods |
{ | ||
"name": "@turf/isolines", | ||
"version": "5.1.0", | ||
"version": "5.1.5", | ||
"description": "turf isolines module", | ||
"main": "main.js", | ||
"module": "main.mjs", | ||
"module": "main.es.js", | ||
"types": "index.d.ts", | ||
@@ -13,3 +13,3 @@ "files": [ | ||
"lib", | ||
"main.mjs" | ||
"main.es.js" | ||
], | ||
@@ -19,2 +19,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", | ||
@@ -46,7 +47,7 @@ "docs": "node ../../scripts/generate-readmes" | ||
"@std/esm": "*", | ||
"@turf/envelope": "^5.1.0", | ||
"@turf/point-grid": "^5.1.0", | ||
"@turf/random": "^5.1.0", | ||
"@turf/rhumb-destination": "^5.1.0", | ||
"@turf/truncate": "^5.1.0", | ||
"@turf/envelope": "^5.1.5", | ||
"@turf/point-grid": "^5.1.5", | ||
"@turf/random": "^5.1.5", | ||
"@turf/rhumb-destination": "^5.1.5", | ||
"@turf/truncate": "^5.1.5", | ||
"benchmark": "*", | ||
@@ -56,3 +57,2 @@ "load-json-file": "*", | ||
"rollup": "*", | ||
"rollup-plugin-buble": "*", | ||
"tape": "*", | ||
@@ -62,6 +62,6 @@ "write-json-file": "*" | ||
"dependencies": { | ||
"@turf/bbox": "^5.1.0", | ||
"@turf/helpers": "^5.1.0", | ||
"@turf/invariant": "^5.1.0", | ||
"@turf/meta": "^5.1.0" | ||
"@turf/bbox": "^5.1.5", | ||
"@turf/helpers": "^5.1.5", | ||
"@turf/invariant": "^5.1.5", | ||
"@turf/meta": "^5.1.5" | ||
}, | ||
@@ -68,0 +68,0 @@ "@std/esm": { |
12
72493
Updated@turf/bbox@^5.1.5
Updated@turf/helpers@^5.1.5
Updated@turf/invariant@^5.1.5
Updated@turf/meta@^5.1.5