reproject-bbox
Advanced tools
Comparing version 0.13.0 to 0.13.1
{ | ||
"name": "reproject-bbox", | ||
"version": "0.13.0", | ||
"version": "0.13.1", | ||
"description": "Reproject a Bounding Box", | ||
@@ -53,3 +53,3 @@ "main": "reproject-bbox.js", | ||
"dependencies": { | ||
"bbox-fns": "^0.19.0", | ||
"bbox-fns": "^0.20.2", | ||
"proj4-fully-loaded": "^0.2.0", | ||
@@ -56,0 +56,0 @@ "proj4-merge": "^0.1.1" |
@@ -11,2 +11,3 @@ export default function reprojectBoundingBox({ | ||
from: number | string, | ||
nan_strategy?: "skip" | "throw" | string | undefined, | ||
proj4?: any, | ||
@@ -13,0 +14,0 @@ split?: boolean | undefined, |
@@ -14,3 +14,3 @@ const merge = require("proj4-merge"); | ||
function reprojectBoundingBox({ bbox, density, from, proj4: _proj4, split = true, to }) { | ||
function reprojectBoundingBox({ bbox, debug_level = 0, density, from, nan_strategy = "throw", proj4: _proj4, split = true, to }) { | ||
if (from === 32767) throw new Error(CUSTOM_PROJECTION_ERROR.replace("{{%s}}", "from")); | ||
@@ -31,6 +31,8 @@ if (to === 32767) throw new Error(CUSTOM_PROJECTION_ERROR.replace("{{%s}}", "to")); | ||
const bboxes = split ? bboxSplit(bbox, { x: [0], y: [0] }) : [bbox]; | ||
if (debug_level >= 2) console.log("[reproject-bbox] bboxes:", bboxes); | ||
const bboxes_reprojected = bboxes.map((bbox) => { | ||
return reproject(bbox, fwd, { density }); | ||
return reproject(bbox, fwd, { density, nan_strategy }); | ||
}); | ||
if (debug_level >= 2) console.log("[reproject-bbox] bboxes_reprojected:", bboxes_reprojected); | ||
@@ -37,0 +39,0 @@ const merged = bboxMerge(bboxes_reprojected); |
Sorry, the diff of this file is too big to display
428403
7594
+ Addedbbox-fns@0.20.2(transitive)
- Removedbbox-fns@0.19.0(transitive)
Updatedbbox-fns@^0.20.2