[FWTools] Segmentation fault copying a dataset with gdal_translate

Bryan Keith bryan at geomega.com
Thu Dec 1 20:20:21 EST 2005


I'm trying to copy a raster dataset with gdal_translate using
GDAL 1.3.1.0, FWTools 1.0.0a7, released 2005/11/10

With gdalinfo the dataset appears OK:

$ gdalinfo t57r83o_g_test.asc
Driver: AAIGrid/Arc/Info ASCII Grid
Size is 3, 7
Coordinate System is `'
Origin = (355249.581600,4973500.390800)
Pixel Size = (1.52400000,-1.52400000)
Corner Coordinates:
Upper Left  (  355249.582, 4973500.391)
Lower Left  (  355249.582, 4973489.723)
Upper Right (  355254.154, 4973500.391)
Lower Right (  355254.154, 4973489.723)
Center      (  355251.868, 4973495.057)
Band 1 Block=3x1 Type=Float32, ColorInterp=Undefined
  NoData Value=-99999

gdal_translate seems to work fine:

$ gdal_translate -of GTiff t57r83o_g_test.asc t57r83o_g_test.tif
Input file size is 3, 7
0.14.28.42.57.71.85.100 - done.

But gdalinfo on the newly created dataset returns a segmentation fault:

$ gdalinfo t57r83o_g_test.tif
Segmentation fault

Originally I found this problem when trying to run a Python script that 
I wrote.  The first 3 lines execute fine, but Python hangs on CreateCopy:

$ python
Python 2.2.1 (#1, Sep  9 2002, 10:01:46)
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import gdal
 >>> ds = gdal.Open("t57r83o_g_test.asc")
 >>> driver = gdal.GetDriverByName("GTiff")
 >>> ds2 = driver.CreateCopy("test3.tif",ds,0)

I can kill Python (ctrl-z).  The output tif is created, but I get the 
same segmentation fault:

$ gdalinfo test3.tif
Segmentation fault

Any ideas?

Bryan


More information about the FWTools mailing list