Welcome to the BEAM Forum!

We encourage you to sign in our forum and participate in the BEAM community. The forum is maintained by the BEAM project team who will most likely answer your questions within 24 hours (except during common holidays) - if not done by other community members. Collaborate, share your knowledge and learn from other users!

If you don't find what you are looking for, please also consider the following external forums:

Combination View Flat View Tree View
Threads [ Previous | Next ]
Export multiple GeoTIFF
toggle
Export multiple GeoTIFF
image export geotiff tiff files
1/10/13 2:33 PM
I am interested in the change of soil moisture over a longer period of time.
Therefore I have a large number of SMOS datasets, which I'd like to export to geotiff for further analysis in SagaGIS or any other GIS. I already tried to export single TIFFs unsing "File > Export Raster Data > GeoTIFF" and it worked great, but is there a way to export all the datasets automatically? I don't want to do the same step a 1000 times...

Many Thanks in advance
Chris
Flag Flag
RE: Export multiple GeoTIFF
3/15/13 9:32 AM as a reply to Christian Sommer.
Hello Chris,

For such a conversion you can use gpt. You can find the script (gpt.bat/.sh) in the bin folder of the BEAM installation.
Type 'gpt -h' on the command line to get help. You should use Write for only converting the data.
For a single product the command should look like the following example:
1gpt Write -f GeoTIFF -t C:\data\smos\output\targetname.tif C:\data\smos\input\sourcename.dbl

You have to write a script which invokes the command for each of your input products.
The following is an example which you can adapt. But it might not work out of the box. I haven't tested exhaustively. It is a single command which can be used in the shell.
1forfiles /P C:\data\smos\ /M *.dbl /C "cmd /c c:\Progra~1\beam\beam-4.10.03\bin\gpt.bat Write -f GeoTIFF  -t @fname.tif @path"

This should create a tif files for each smos file in the same directory.
Another maybe simpler but not so elegant way is to write a script which invokes the command for each file explicitly. Excel or other spreadsheet software is helpful to generate it.

best wishes
Marco
Flag Flag
RE: Export multiple GeoTIFF
1/14/13 6:27 PM as a reply to Marco Peters.
Hello Marco,

This is exactly what I was looking for, thank you!
Now I have the same problem as is already mentioned in this post:SMOS Export. The full product is too large to export, so I have to specify the 'soil_moisture' band.
In 'gpt -h' I could not find the right command for this action. Do you know how to solve this?

best wishes
Chris
Flag Flag
RE: Export multiple GeoTIFF
1/15/13 8:45 AM as a reply to Christian Sommer.
Instead of the Write operator you have to use the Subset operator. This one allows to specify a list of bands.
Try
1gpt -h Subset
for some help.
I hope I can give you a bit more information later this day.

Marco
Flag Flag
RE: Export multiple GeoTIFF
1/15/13 2:29 PM as a reply to Christian Sommer.
This is an updated version of the before mentioned command. This includes the Subset operator and sets the band 'soil_moisture' to be included in the output. All other will not be written.

1forfiles /P C:\data\smos\ /M *.dbl /C "cmd /c c:\Progra~1\beam\beam-4.10.03\bin\gpt.bat Subset -PbandNames=soil_moisture -f GeoTIFF -t @fname.tif @path"


best wishes
Marco
Flag Flag
RE: Export multiple GeoTIFF
3/14/13 8:29 PM as a reply to Marco Peters.
Finally I found out why this did not work on my system. In fact it is moreover a problem with my OS than with the Beam software, but maybe other users might have the same problem, so here's the solution:

I am using a Windows 7 64bit OS. The batch command had problems executing this part: c:\Progra~1\beam\beam-4.10.03\bin\gpt.bat
Obiously the "~1" was wrongly interpreted, because there are two folders "Program Files" and "Program Files (x86)".
Creating a shortcut to the Beam Software with a not misunderstandable path that was used instead solved the problem.

Thans again for your help!
Chris
Flag Flag
RE: Export multiple GeoTIFF
9/30/14 7:55 AM as a reply to Marco Peters.
Hi Macro,

I am working on the similar task as Chris, however, I couldn't find any gpt.bat/.sh script in the bin folder of BEAM installation. What I do have is the gpt, pconvert, etc. May I know is there any problem during my installation or any file that I missed during the download and installation? I am currently working on BEAM 5.0 with SMOS tool box installed, the Export to tiff function is working fine.

Thank you.
Flag Flag
RE: Export multiple GeoTIFF
9/30/14 8:20 AM as a reply to Chuen Siang Kang.
Hi,

on what operating system are you working? It is possible that the file extensions are simply hidden on your system.
Open the command line, go to the bin folder and make a directory listing. There you should see the file extensions.

regards
Marco
Flag Flag
RE: Export multiple GeoTIFF
9/30/14 8:35 AM as a reply to Marco Peters.
Hi,

I am working on Windows 7 64-bit system. Tried to find the gpt.bat/.sh using command line but it shows "File not found". Any suggestions from you?

Thanks.
Flag Flag
RE: Export multiple GeoTIFF
9/30/14 8:59 AM as a reply to Chuen Siang Kang.
But you said you have a gpt file and a pconvert file. Both should have a .bat file extension.
There is no file named "gpt.bat/.sh". It is either gpt.bat or gpt.sh, depending on the operating system.

regards
Marco
Flag Flag
RE: Export multiple GeoTIFF
9/30/14 10:45 AM as a reply to Marco Peters.
Yes, I was confused with the "gpt.bat/.sh", I got the gpt.bat file already. Thanks for the help!
Flag Flag