[FWTools] Re: Segmentation fault copying a dataset with
gdal_translate
Bryan Keith
bryan at geomega.com
Tue Dec 6 12:05:33 EST 2005
Hi list,
I've had a little time to look at this issue again this morning, but I'm
pretty stumped. I wonder if my FWTools installation isn't done
correctly. I realize that this is the first time that I've tried to use
GDAL on Linux. ogr and geos seem to work fine. That's what I've used
before, and I tested them with the 1.0.0a7 installation, and they're
still working fine.
What I did this morning:
copy a tif from the windows machine to the linux machine
The tif looks fine from windows:
>gdalinfo t57r83o_g_test.tif
Driver: GTiff/GeoTIFF
Size is 3, 7
Coordinate System is:
PROJCS["NAD83 / UTM zone 13N",
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.2572221010002,
AUTHORITY["EPSG","7019"]],
AUTHORITY["EPSG","6269"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4269"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",-105],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","26913"]]
Origin = (355249.581600,4973500.390800)
Pixel Size = (1.52400000,-1.52400000)
Metadata:
AREA_OR_POINT=Area
Corner Coordinates:
Upper Left ( 355249.582, 4973500.391) (106d50'0.23"W, 44d54'0.76"N)
Lower Left ( 355249.582, 4973489.723) (106d50'0.22"W, 44d54'0.42"N)
Upper Right ( 355254.154, 4973500.391) (106d50'0.02"W, 44d54'0.77"N)
Lower Right ( 355254.154, 4973489.723) (106d50'0.01"W, 44d54'0.42"N)
Center ( 355251.868, 4973495.057) (106d50'0.12"W, 44d54'0.59"N)
Band 1 Block=3x7 Type=Float32, ColorInterp=Gray
NoData Value=-99999
However, on Linux this command never finishes:
$gdalinfo t57r83o_g_test.tif
I tried some other files and encounter the same problem. My guess is
that if I send the tif to someone else gdalinfo would read it without a
problem. Anyone want to try? But if that's the case, I'm not sure what
to do next. Thanks for any help.
Bryan
Bryan Keith
GIS Specialist
Geomega, Inc.
Boulder, CO, USA
Bryan Keith wrote:
> 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