[Gdal-dev] How to read GeoTIFF dimensions?

Simmer s.normann at gmx.com
Mon Mar 2 08:28:28 EST 2009


Hi!

I want to cut several hundred GeoTIFFs of 1GB each into 4 pieces each.
I'm using the following commands for each image:

gdal_translate.exe -srcwin 0 0 10460 11931 source.tif output_01.tif
gdal_translate.exe -srcwin 10460 0 10460 11931 source.tif output_02.tif
gdal_translate.exe -srcwin 0 11931 10460 11931 source.tif output_03.tif
gdal_translate.exe -srcwin 10460 11931 10460 11931 source.tif output_04.tif

Problem is: This is just an example. Each GeoTiff has different dimensions.
Is there a possibility to either:

- Let GDAL automatically cut each image into 4 parts without giving XY
coordinates?

or:

- To read the GeoTIFF coordinates into a list or something without having to
open each single file.
I know that gdal_translate.exe -srcwin can read the dimensions but I need
them all to be listed somewhere to insert them to the commands. Windows
Explorer should be able to show the dimensions in a list, but crashes at
GeoTiffs of that size...

Bests,
Simmer 
-- 
View this message in context: http://n2.nabble.com/How-to-read-GeoTIFF-dimensions--tp2409146p2409146.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.



More information about the gdal-dev mailing list