Opened 12 years ago

Closed 11 years ago

#4664 closed defect (fixed)

gdal2tiles.LatLonToPixels has lat/lon inverted

Reported by: dandye Owned by: warmerdam
Priority: normal Milestone:
Component: Utilities Version: svn-trunk
Severity: normal Keywords: gdal2tiles
Cc:

Description (last modified by dandye)

lat and lon are inverted inside the LatLonToPixels method.

362,363c362,363
< 		px = (180 + lon) / res
< 		py = (90 + lat) / res
---
> 		px = (180 + lat) / res
> 		py = (90 + lon) / res

Attachments (1)

fix_gdal2tiles_LatLonToPixels.patch (126 bytes ) - added by dandye 12 years ago.
Patch to fix inversion of lat/lon in LatLonToPixels method of gdal2tiles.py

Download all attachments as: .zip

Change History (3)

by dandye, 12 years ago

Patch to fix inversion of lat/lon in LatLonToPixels method of gdal2tiles.py

comment:1 by dandye, 12 years ago

Description: modified (diff)

comment:2 by Even Rouault, 11 years ago

Resolution: fixed
Status: newclosed

The proposed patch would have broken the functionnality. There was indeed 2 inversions in the original code, which resulted in a correct behaviour...

r26168 "gdal2tiles.py: fix confusing code by changing the code from LatLon logic to LonLat logic (no behaviour change, just better code readability) (#4664)"

Note: See TracTickets for help on using tickets.