PDF Print E-mail
Written by Batuhan Osmanoglu   
Wednesday, 24 August 2011 18:28

GAMMA data2geotiff GDAL error

Today I noticed that I was not able to run the data2geotiff command from the GAMMA package. The error message indicated that it was not able to find the GDAL libraries even though they were installed on the system.

 

 

The error message was:

 

$ data2geotiff
data2geotiff: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory
All I had to do was to find the GDAL library and create a link with this name. This error probably was due to the fact that I have the binary GAMMA version and the executable files were created on a system which had the library as libgdal.so.1. So searching for libgdal returned the following:
$ locate libgdal
/opt/google/earth/free/libgdal.so.1
/usr/lib/libgdal1.6.0.a
/usr/lib/libgdal1.6.0.so
/usr/lib/libgdal1.6.0.so.1
/usr/lib/libgdal1.6.0.so.1.13.3
/usr/lib/ogdi/libgdal.so
...
So creating a link to that file solved the problems:
$ cd /usr/lib
$ sudo ln -s libgdal1.6.0.so libgdal.so.1
Now everything is perfect!
$ data2geotiff
*** DISP data2geotiff: convert raster data into geotiff format ***
*** Copyright 2008, Gamma Remote Sensing, v1.1 9-Sep-2009 awi ***
usage: data2geotiff <DEM_par> <data> <type> <GeoTIFF> [nodata]
input parameters: 
  DEM_par  (input) DIFF DEM/MAP parameter file
  data     (input) data file
  type     input data type:
             0: Sun raster or BMP image
             1: short data
             2: float data
             3: scomplex data
             4: fcomplex data
  GeoTIFF  (output) GeoTIFF file (.tif is the recommended extension)
  nodata   nodata value (default=0.0)