[gdal-dev] Reprojecting a tiled dataset

Stephen Woodbridge woodbri at swoodbridge.com
Tue Nov 23 20:17:18 EST 2010

On 11/23/2010 7:52 PM, Frank Warmerdam wrote:
> Mike Leahy wrote:
>> Hello list,
>> I'm wondering if anyone has any recommendations for reprojecting a
>> large, already-tiled RGB GeoTiff image dataset. It's straightforward
>> enough to script the reprojection of individual tiles, but this leaves
>> black wedges on the sides. I can merge tiles and add '-n 0' to treat
>> the black wedges as no data, and the merged output looks fine with no
>> visible black strips, but this is a dataset that is of the order of
>> 60GB, so merging all of the tiles takes a particularly long time.
>> I thought maybe I could use gdal_retile.py...except that doesn't
>> include an arugment that allow for the exclusion of a particular
>> nodata value in the output. I figure I could incorporate something to
>> account for nodata into a customized version of gdal_retile.py
>> script...would anyone have any pointers for doing this?
> Mike,
> I would suggest using gdalbuildvrt to build a virtual dataset
> referencing all the tiles, and then gdalwarp that. I'd suggested
> including "-co TILED=YES" in the gdalwarp command to produce an internally
> tiled output GeoTIFF file.

Hi Frank,

Does this generate one 60GB output file or can it generate a new 
gdalwarp set of tiles with .vrt as output? This would be very cool!

So what would the gdalwarp command look like? something like:

gdalwarp -t_srs EPSG:900913 -co TILED=YES -of GTiff -srcnodata 0 
-dstnodata 0 input.vrt outdir/output.vrt

-Steve W

More information about the gdal-dev mailing list