Add Constants

This commit is contained in:
Chris Pham
2018-01-18 10:47:56 -08:00
parent 619e98772a
commit d1939b5e69

View File

@@ -7,4 +7,20 @@ import urllib
import PIL.Image import PIL.Image
from io import StringIO, BytesIO from io import StringIO, BytesIO
import os import os
import time import time
#####################################
# Constants
#####################################
_KEY =
# Number of pixels in half the earth's circumference at zoom = 21
_EARTHPIX = 268435456
# Number of decimal places for rounding coordinates
_DEGREE_PRECISION = 4
# Larget tile we can grab without paying
_TILESIZE = 640
# Fastest rate at which we can download tiles without paying
_GRABRATE = 4
# Pixel Radius of Earth for calculations
_pixrad = _EARTHPIX / math.pi