Skip to content

Commit 2bee4fe

Browse files
committed
Merge pull request #2 from ngageoint/develop
Develop
2 parents 491e71f + c2f4468 commit 2bee4fe

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,18 @@ public static int tilesPerSide(int zoom) {
443443
return (int) Math.pow(2, zoom);
444444
}
445445

446+
/**
447+
* Get the standard y tile location as TMS
448+
* @param zoom
449+
* @param y
450+
* @return
451+
*/
452+
public static int getYAsTMS(int zoom, int y){
453+
int tilesPerSide = tilesPerSide(zoom);
454+
int tmsY = tilesPerSide - y - 1;
455+
return tmsY;
456+
}
457+
446458
/**
447459
* Get the zoom level from the tiles per side
448460
*

0 commit comments

Comments
 (0)