Creates Big Image

This commit is contained in:
Chris Pham
2018-01-25 10:49:36 -08:00
parent 1961da734b
commit d882a936e2
2 changed files with 3 additions and 4 deletions

View File

@@ -124,9 +124,8 @@ class GMapsStitcher(object):
def _pixels_to_lat(self, iterator, lat_pixels): def _pixels_to_lat(self, iterator, lat_pixels):
# Magic Lines # Magic Lines
degree = self._pixels_to_degrees((iterator - self.num_tiles / 2) * _TILESIZE, self.zoom) return math.degrees(math.pi / 2 - 2 * math.atan(
temp = math.atan(math.exp(((lat_pixels + degree) - _EARTHPIX))/ _PIXRAD) math.exp(((lat_pixels + self._pixels_to_degrees((iterator - self.num_tiles / 2) * _TILESIZE, self.zoom)) - _EARTHPIX) / _PIXRAD)))
return math.degrees(math.pi / 2 - 2 * temp)
def fetch_tiles(self): def fetch_tiles(self):
# cap floats to precision amount # cap floats to precision amount

View File

@@ -1,5 +1,5 @@
import mapping import mapping
obj = mapping.GMapsStitcher(10000, 10000, 44.57078, -123.275998, 21, 'terrain', 200) obj = mapping.GMapsStitcher(1, 1, 44.57078, -123.275998, 18, 'terrain', None, 20)
obj.fetch_tiles() obj.fetch_tiles()