diff --git a/geowarp.js b/geowarp.js index a401b98..8d3d625 100644 --- a/geowarp.js +++ b/geowarp.js @@ -918,7 +918,7 @@ const geowarp = function geowarp({ let raw_values = []; if (leftSample >= in_width || rightSample < 0 || bottomSample < 0 || topSample >= in_height) { - raw_values = new Array(read_bands.length).fill(in_no_data); + raw_values = new Array(read_bands.length).fill(primary_in_no_data); } else { // clamp edges to prevent clipping outside bounds leftSample = Math.max(0, leftSample); diff --git a/test.js b/test.js index ca5f2f2..6df4d6a 100644 --- a/test.js +++ b/test.js @@ -106,7 +106,9 @@ test("reproject without clipping", async ({ eq }) => { out_layout: "[band][row][column]", out_srs, forward, - inverse + inverse, + method: "median", + round: true }); if (process.env.WRITE) {