Created
January 19, 2016 15:22
-
-
Save n-kb/a441b772addd35260a1f to your computer and use it in GitHub Desktop.
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
# Loops through all zoom levels | |
for zoom_level in range(4,13): | |
# Computes all tiles for the whole world | |
for X in range (0, int(math.pow(2, zoom_level))): | |
for Y in range (0, int(math.pow(2, zoom_level))): | |
# Finds the bounds of each tile | |
N_tile, W_tile = num2deg(X, Y, zoom_level) | |
S_tile, E_tile = num2deg(X + 1, Y + 1, zoom_level) | |
#Are we in Europe? | |
if N_tile < N_max and S_tile > S_max : | |
if E_tile < E_max and W_tile > W_max: | |
# Makes the tile... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment