Feature request #11688

Translate (convert format): add a batch option that creates outputs with the name of the corresponding input

Added by Filipe Dias over 9 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/GDAL
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:19932

Description

It would be nice to add a "Batch GDAL translate" algorithm that converts a number of rasters stored in a folder and stores the outputs (with the same name as the input) in another folder. The built in batch processing engine creates temporary rasters stored in /temp. If the user wishes to alter their name and its storage location, he/she has to do it manually.

This is an example bash script that I found here that does what I propose: http://gis.stackexchange.com/questions/54819/gdal-translate-converting-esri-grid-to-geotiff-in-batch

#!/bin/bash
for FILE in arcgis_folders_here/*
do
echo "Processing $FILE file..."
gdal_translate -a_srs "+proj=tmerc +lat_0=39.668258 +lon_0=-8.133108 +k=1 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs" -of GTiff $FILE $FILE.tif
done

History

#1 Updated by Giovanni Manghi over 9 years ago

  • Status changed from Open to Feedback

I don't understand, we already have the translate tool, and as any tool in processing it works in batch mode.

#2 Updated by Filipe Dias over 9 years ago

  • Subject changed from Translate (convert format): add batch option to Translate (convert format): add a batch option that creates outputs with the name of the corresponding input

Sorry, poor issue description. I've edited it. See above.

#3 Updated by Giovanni Manghi over 9 years ago

Filipe Dias wrote:

Sorry, poor issue description. I've edited it. See above.

there is already a function to autofill the output names, and you can use as parameter the input names.

#4 Updated by Filipe Dias over 9 years ago

  • Status changed from Feedback to Closed

Thanks, I wasn't aware of that.

Also available in: Atom PDF