Skip to content

Commit

Permalink
gdal2tiles: fix tile grid origin of openlayers with -p geodetic
Browse files Browse the repository at this point in the history
--tmscompatible --xyx as arguments
  • Loading branch information
kikitte.lee committed Sep 3, 2021
1 parent 0ac07cd commit a61847c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gdal/swig/python/gdal-utils/osgeo_utils/gdal2tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,10 @@ def generate_openlayers(self) -> str:
args['resolutions'] = '[' + ','.join('%.18g' % res for res in resolutions) + ']'

if self.options.xyz:
args['origin'] = '[-180,90]'
if self.options.tmscompatible:
args['origin'] = '[-180,90]'
else:
args['origin'] = '[-180,270]'
args['y_formula'] = 'tileCoord[2]'
else:
args['origin'] = '[-180,-90]'
Expand Down

0 comments on commit a61847c

Please sign in to comment.