Skip to content

Commit

Permalink
Merge pull request #4426 from kikitte/master
Browse files Browse the repository at this point in the history
gdal2tiles: fix tile grid origin of openlayers with xyz and geodetic profile as arguments (fixes #4425)
  • Loading branch information
rouault authored Sep 4, 2021
2 parents d363707 + a61847c commit ba1308d
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 ba1308d

Please sign in to comment.