<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">- Let GDAL automatically cut each image into 4 parts without giving XY<br>
coordinates?<br></blockquote>
<br>Your question really has nothing to do with GDAL and is more about shell programming and shell usage. GDAL gives you all the information, what you do with it is up to you. The DOS/Windows shell is not optimized for this kind of scripting. Running the gdal tools under cygwin might work best for you as many examples exist of this type of thing in bash.<br>
<br>Looks like you're on windows, but if you have sed and grep installed in your path you could run:<br>gdalinfo image.tif |grep ^Size | sed 's/Size is//g;s/ //g'.<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
- To read the GeoTIFF coordinates into a list or something without having to<br>
open each single file.<br>
I know that gdal_translate.exe -srcwin can read the dimensions but I need<br>
them all to be listed somewhere to insert them to the commands. Windows<br>
Explorer should be able to show the dimensions in a list, but crashes at<br>
GeoTiffs of that size...<br></blockquote>
<br>In bash (under cygwin on windows perhaps) you could set this to a shell variable:<br>XY=$(gdalinfo image.tif |grep "^Size" | sed 's/Size is//g;s/ //g')<br># Then parse out the X and Y extents individually.<br>
x=$(echo $XY | cut -d"," -f1)<br>y=$(echo $XY | cut =d"," -f2)<br><br>gdalinfo can give you a bunch of other info too, try just:<br>gdalinfo image.tif <br>to see all of gdalinfo's output.<br><br clear="all">
Jonah<br><br>