Skip to content

Commit

Permalink
updated geotiff-tile
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielJDufour committed Nov 12, 2023
1 parent 4615ef3 commit 626a771
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"dependencies": {
"frame-worker": "^0.3.0",
"geotiff": "^2.1.0",
"geotiff-tile": "^0.18.1",
"geotiff-tile": "^0.18.2",
"get-depth": "^0.0.3",
"microlink": "^0.1.1",
"quick-lru": "^7.0.0"
Expand Down
26 changes: 26 additions & 0 deletions test.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
// TEST_NAME: "function params",
// TEST_NAME: "gadas",
// TEST_NAME: "simple srs",
// TEST_NAME: 'tile_srs="simple"',
TEST_TIMED: true
}
};
Expand Down Expand Up @@ -334,6 +335,31 @@
eq(tile.length, height * width * 4);
displayTile({ id: "simple", tile, height, width });
});

test('tile_srs="simple"', async ({ eq }) => {
const worker = await geotiff_tile_web_worker.createWorker();

const params = {
bbox: [128, 656, 144, 672],
bbox_srs: "simple",
debug_level: 4,
method: "near-vectorize",
round: false,
tile_array_types: ["Array", "Array", "Array"],
tile_height: 256,
tile_layout: "[band][row][column]",
tile_srs: "simple",
tile_width: 256,
timed: true,
use_overview: true,
geotiff_srs: "simple",
url: "http://localhost:8080/data/vestfold.tif"
};
const { tile, width, height } = await worker.createTile(params);
eq(tile !== undefined, true);
eq(tile.length, 1);
eq(tile[0].length, 2);
});
</script>
</body>
</html>

0 comments on commit 626a771

Please sign in to comment.