Skip to content

Commit

Permalink
Merge pull request #4428 from OSGeo/backport-4426-to-release/3.3
Browse files Browse the repository at this point in the history
[Backport release/3.3] gdal2tiles: fix tile grid origin of openlayers with xyz and geodetic profile as arguments (fixes #4425)
  • Loading branch information
rouault authored Sep 7, 2021
2 parents 2f22e66 + a712df1 commit 34a514c
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 34a514c

Please sign in to comment.