Skip to content

Commit

Permalink
fix: imagery size is off by one
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Jan 28, 2020
1 parent 52a4528 commit 1d7047a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cog/src/cog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function onProgress(keys: Record<string, any>, logger: LogType): (p: numb
* @param tileSize (Optional) size of each tile
*/
export function getTileSize(quadKey: string, targetResolution: number, tileSize = 256): number {
return tileSize * Math.pow(2, targetResolution - quadKey.length);
return tileSize * Math.pow(2, targetResolution - quadKey.length + 1);
}

/**
Expand Down

0 comments on commit 1d7047a

Please sign in to comment.