Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I run gdal2tiles.py on a vrt (EPSG:4326) file and gives good results when overlay over OSM. Openlayers projection is EPSG:900913. The output is a set of directory/files (z/x/y). I used ms4w.

However, when I use slippy map calculations to find x/y tiles using equations here (lon/lat to tile numbers) it gives wrong y tiles (14730 in equations 17876 in gdal2tiles) (x tiles are the same as gdal2tiles).

When I reverse sign y coordinates I get right tile numbers, but the reverse equation (tile number to lat/lon) gives negative lat coordinates.

Is this related to coordinates transformation?

Thanks.

share|improve this question
Can you expand this a bit more, to show the calculations you are trying to do and the working in your working of the equations? – BradHards Aug 19 '12 at 11:32

closed as too localized by underdark Aug 20 '12 at 6:35

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

Sorry, The above calculations on both methods are correct. The thing that made this confusion is that gdal2tiles calculated tile set per mercator profile (default) even the vrt file is EPSG:4326, while I was calculating mine on geodetic profile. When I set the profile to geodetic I got same results.

Note: tile set for geodetic/mercator is different, although x coordinates are the same.

Regards,

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.