12

I'm looking for a function similar to GRASS r.resample. I have a folder full of TIF files and want to reduce their resolution ("scale them down") to reduce file size.

asked Sep 7, 2010 at 10:30

1 Answer 1

19

Your best bet would appear to be gdalwarp, which is documented over here. It's trivially easily scriptable, but the details would depend on your operating system. In Windows, you'd do something like:

for %i in (*.tif) do gdalwarp -ts 1600 0 -r cubic -co "TFW=YES" %i %~ni_small.tif

which should reduce the input files to 1600 pixels wide, saving the file with the original name appended with "small". This is seriously untested, ymmv. Besides, you're probably using Linux - if so, post back, and someone can help there. Ditto if you're looking for a Python solution.

Edited: added parameter to create ESRI world file. Note that this solution doesn't specify the output format, so it's a GeoTiff by default

answered Sep 7, 2010 at 12:28
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.