[Geotiff] utility that will split a GeoTiff file into smaller files

Frank Warmerdam warmerdam at pobox.com
Fri Nov 17 14:16:17 EST 2006


John Mitchell wrote:
> Hi,
> 
> Does anyone know a of utility that will split a GeoTiff file into 
> smaller files.  I have a GeoTiff that is 1.1 gb that I need to split 
> into files that are not larger than 50 mb for each file.

John,

You can "manually" prepare a script of gdal_translate commands to split
a file into chunks.  For instance, if you file was 40K x 40K you could
split it up into 10K x 10K files like:

  gdal_translate -srcwin 0 0 10000 10000 big.tif tile00.tif
  gdal_translate -srcwin 10000 0 10000 10000 big.tif tile10.tif
  ...

Just be careful that your srcwin on the right and bottom does not extend
off the file or an error will occur.

The gdal_translate program does produce GeoTIFFs (by default), but the
coordinate system information goes through an internal transformation
and may come out slightly different.  Though functionally it should
be the same.

You can find gdal_translate in the FWTools distribution:

   http://fwtools.maptools.org/

PS. If these are RGB files you might also want to include the
-co INTERLEAVE=PIXEL option to force using contiguous rather than
seperate organization for the data.  Quite a few applications don't
support seperate properly but it is the default gdal_translate output.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the Geotiff mailing list