Skip to content

Instantly share code, notes, and snippets.

@n-kb
Created January 19, 2016 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n-kb/7e8e1a28ea434762d511 to your computer and use it in GitHub Desktop.
Save n-kb/7e8e1a28ea434762d511 to your computer and use it in GitHub Desktop.
# Loops through all zoom levels
for zoom_level in range(4,13):
#Loops through all cities
for city in cities:
#Finds out which tile the city is in
X_city, Y_city = deg2num(city_lat, city_lng, zoom_level)
# Computes the 16 tiles around the city
for X in range(X_city - 2, X_city + 2):
for Y in range (Y_city - 2, Y_city + 2):
# Makes the tile...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment