FWTools / GDAL for free and easy file conversion

GDAL is a translator library for raster geospatial data formats that is released under an X/MIT style Open Source license by the Open Source Geospatial Foundation. This tool can be accessed for free and easy file type translation between software through the FWTools package, downloadable at http://fwtools.maptools.org/. Its command line format so you can refer to the note below as a quick tutorial; this is specific to conversion between Tif and Idrisi raster, however in FWTools you can type ‘gdal_translate help’ to view a list of the file formats that you can work between.

To import GeoTiff to Idrisi using GDAL

You’ll need to be logged in as an administrator to both download and install, and then run this program.

1. Download and install FWTools from: http://fwtools.maptools.org/

The GDAL (command line utilities) is one of the tools included.

2. Open the “Start\All Programs\FWTools x.x.x\FWTools Shell”

3. In the DOS prompt type:
DOS SHELL SAYS –> C:Program Files/FWToolsx.x.x>
TYPE THIS –> gdal_translate -of rst -b 1 input.tif output.rst

‘-of’ means ‘output format’.

The part that says ‘-b’ means that there are multiple bands. For example, if there are
4 bands for this file so you’ll need to type into this DOS prompt 4 times. -b 1, -b 2, etc…

Where it says input.tif, type in the name of your tif file with .tif extension. Where it says output, type the name you’d like the output raster file to have with the .rst extension. Be sure to type in full path names otherwise the default will be for gdal to look in the ‘C:Program Files/FWTools Shell’ folder.

4. Check projection, data type, size, etc:

E:\Data\> gdalinfo output.rst

5. Reproject if necessary:

E:\Data\> gdalwarp -t_srs ‘EPSG:4296’ output.rst output2.rst

FWTools example

…a quick sidenote. FWTools runs in a DOS prompt wich initially begins in the FWTools directory; from here you can run the translation and enter full path and file names for your data, or use the typical change directories command (cd) to run the translation from the directory already containing your data, in which simple file names will work.


5 Responses to FWTools / GDAL for free and easy file conversion

  1. Map Maker says:

    have you used this yet?
    looks interesting.

  2. joesusforterror says:

    yes indeedy, i use it whenever i need to move between Arc formats and Idrisi since the Image and GeoTiff formats don’t work using their respective Import/Export tools.

    basically whenever you run into an import error, instead of having to figure out a work-around you can just skip to this.

  3. farawayhillsaregreener says:

    i mentioned this handy utility on an interview – and they never heard of it – they seemed shocked that it would be free – and then asked what was dos. loonys i tells ya

  4. Francisca says:

    I hope this still works, I want to move from Geotiff to Idrisi format to open hyperspectral imagery in TerrSet, do you have an active link to downloading GDAL?

    • joef says:

      I haven’t been in IDRISI’s new TerrSet iteration yet so there may already be tools available in there that can batch tiff-to-rst easier than with GDAL. I don’t know. But if they don’t gdal will still work just fine. You can download it at http://fwtools.maptools.org/. After getting all your hyperspectral bands into .rst format you’ll need to edit all of the raster files to make sure the projection systems are correct, and all the same. I can’t remember the name off the top of my head but somewhere in IDRISI there is a batch RDC edit tool you can use for that, it’s really simple once you find it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: