Created
October 4, 2012 14:24
-
-
Save geobabbler/3833833 to your computer and use it in GitHub Desktop.
Additional function for MapTiler to calculate ArcGIS tile coordinates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def AgsTile(self, tx, ty, zoom): | |
#Converts TMS tile coordinates to ArcGIS Tile coordinates | |
xhex = hex(tx) | |
yhex = hex((2**zoom - 1) - ty) | |
xhex = xhex.replace("0x", "") | |
yhex = yhex.replace("0x", "") | |
xhex = "C" + xhex.zfill(8) | |
yhex = "R" + yhex.zfill(8) | |
return xhex, yhex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment