Skip to content

Commit

Permalink
feat: switch tests to using a webmercator aligned test tiff
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Oct 7, 2019
1 parent a69c8c1 commit 56a88f0
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 2 deletions.
Binary file modified packages/tiler/data/expected/tile_1024_262144_262144_z19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/tiler/data/expected/tile_2048_262144_262144_z19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/tiler/data/expected/tile_256_131072_131072_z18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/tiler/data/expected/tile_256_262144_262144_z19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/tiler/data/expected/tile_4096_262144_262144_z19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/tiler/data/expected/tile_512_262144_262144_z19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/tiler/data/rgba8_tiled.wm.tiff
Binary file not shown.
5 changes: 3 additions & 2 deletions packages/tiler/src/__test__/tile.creation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ function getExpectedTile(tileSize: number, x: number, y: number, zoom: number):
}

describe('TileCreation', () => {
const tiffPath = path.join(__dirname, '../../data/rgba8_tiled.tiff');
// Tiff that is tiled and has WebMercator alignment for its resolution levels
const tiffPath = path.join(__dirname, '../../data/rgba8_tiled.wm.tiff');
const tiff = new CogTiff(new CogSourceFile(tiffPath));

beforeEach(async () => {
Expand All @@ -39,7 +40,7 @@ describe('TileCreation', () => {
expect(layers.length).toEqual(1);
const [layer] = layers;
expect(layer.id).toEqual(tiff.source.name);
expect(layer.extract).toEqual({ height: 4, width: 4 });
expect(layer.extract).toEqual({ height: 16, width: 16 });
expect(layer.resize).toEqual({ height: 2, width: 2 });
expect(layer.x).toEqual(tiler.tileSize / 2);
expect(layer.y).toEqual(tiler.tileSize / 2);
Expand Down

0 comments on commit 56a88f0

Please sign in to comment.