[gdal-dev] gdal2tiles - incorrect corner coordinates

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Tue Oct 14 14:17:53 PDT 2014


Jan Tosovsky <j.tosovsky <at> email.cz> writes:

> 
> Dear All,
> 
> when producing GeoTiff tiles from large GeoTiff that contains Corner
> Coordinates:
> Upper Left  ( 1558426.488, 6800200.793) ( 13d59'58.50"E, 52d 0' 1.50"N)
> Lower Left  ( 1558426.488, 6446209.776) ( 13d59'58.50"E, 49d59'58.63"N)
> Upper Right ( 2003776.864, 6800200.793) ( 18d 0' 0.84"E, 52d 0' 1.50"N)
> Lower Right ( 2003776.864, 6446209.776) ( 18d 0' 0.84"E, 49d59'58.63"N)
> 
> I am getting tiles with Corner Coordinates:
> Upper Left  (    0.0,    0.0)
> Lower Left  (    0.0,  256.0)
> Upper Right (  256.0,    0.0)
> Lower Right (  256.0,  256.0)
> 
> I would expect that every tile contains a subset of the original coords.
> 
> My command (GDAL 1.11.0):
> gdal2tiles.py -v -z 6-7 warped.tif D:\OUTPUT
> 
> How can I fix this?

Hi,

You have wrong assumption about how gdal2tiles work. It does not create
tiles which are individually georeferenced. Instead, it creates images and
saves them to a directory structure which is well defined and whose metadata
is published. In the documentation http://www.gdal.org/gdal2tiles.html it is
written as "This utility generates a directory with small tiles and
metadata, following the OSGeo Tile Map Service Specification". Similarly
this OpenStreetMap tile is not georeferenced
http://a.tile.openstreetmap.org/9/281/172.png. However, the tiling schema is
known and because of that it is possible to know where tile number
9/281/172.png belongs.

-Jukka Rahkonen-





More information about the gdal-dev mailing list