Skip to content

Commit

Permalink
Switched res factors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven D. Lander committed Jul 25, 2013
1 parent 36af00c commit b007343
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gdal/swig/python/scripts/gdal2tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,13 @@ class GlobalGeodetic(object):
def __init__(self, tmscompatible, tileSize = 256):
self.tileSize = tileSize
if tmscompatible is not None:
# Defaults the resolution factor to 1.40625 (1 tile @ level 0)
# Adheres OpenLayers, MapProxy, etc default resolution for TMS
self.resFact = 180.0 / self.tileSize
else:
# Defaults the resolution factor to 0.703125 (2 tiles @ level 0)
# Adhers to OSGeo TMS spec http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic
self.resFact = 360.0 / self.tileSize
else:
# Defaults the resolution factor to 1.40625 (1 tile @ level 0)
# Adheres OpenLayers, MapProxy, etc default resolution for TMS
self.resFact = 180.0 / self.tileSize

def LatLonToPixels(self, lat, lon, zoom):
"Converts lat/lon to pixel coordinates in given zoom of the EPSG:4326 pyramid"
Expand Down

0 comments on commit b007343

Please sign in to comment.