[gdal-dev] How to divide a raster layer into a set of tiles?
Gilles Bassière
gbassiere at gmail.com
Tue Mar 23 04:32:26 EDT 2010
Even Rouault wrote:
> Le Monday 22 March 2010 19:35:47 Gilles Bassière, vous avez écrit :
>> Hi,
>>
>> The problem with this workflow is that it creates non-georeferenced
>> tiles (I don't know if this is the intended behaviour of this command).
>
> gdal_retile.py *does* create georeferenced tiles. I've just verified it. What
> make you think the contrary ?
>
>
I created the new tile set with this command:
$ gdal_retile.py -targetDir $DATA_OUT/ -ps 10000 10000 -of ECW
$DATA/ortho-dept04-2004-lam93.vrt
and if I run gdalinfo on one of the resulting tiles, I get:
$ gdalinfo $DATA_OUT/ortho-dept04-2004-lam93_04_08.ecw
Driver: ECW/ERMapper Compressed Wavelets
Files:
/home/gilux/Data/ortho-dept04-2004-lam93/ortho-dept04-2004-lam93_04_08.ecw
/home/gilux/Data/ortho-dept04-2004-lam93/ortho-dept04-2004-lam93_04_08.ecw.aux.xml
Size is 10000, 10000
Coordinate System is:
PROJCS["unnamed",
GEOGCS["GRS 1980(IUGG, 1980)",
DATUM["unknown",
SPHEROID["GRS80",6378137,298.257222101],
TOWGS84[0,0,0,0,0,0,0]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Lambert_Conformal_Conic_2SP"],
PARAMETER["standard_parallel_1",49],
PARAMETER["standard_parallel_2",44],
PARAMETER["latitude_of_origin",46.5],
PARAMETER["central_meridian",3],
PARAMETER["false_easting",700000],
PARAMETER["false_northing",6600000],
UNIT["Meter",1]]
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0,10000.0)
Upper Right (10000.0, 0.0)
Lower Right (10000.0,10000.0)
Center ( 5000.0, 5000.0)
Band 1 Block=10000x1 Type=Byte, ColorInterp=Red
Overviews: arbitrary
Band 2 Block=10000x1 Type=Byte, ColorInterp=Green
Overviews: arbitrary
Band 3 Block=10000x1 Type=Byte, ColorInterp=Blue
Overviews: arbitrary
The tiles are actually georeferenced but pixel coordinates are used. For
every tile, the corner coordinates are the same and it corresponds to
the -ps option.
--
Gilles Bassière - Web/GIS software engineer
http://gbassiere.free.fr/
More information about the gdal-dev
mailing list