Hi Pete,
unfortunately I can confirm that it still segfaults...
GRASS 6.1.cvs (spearfish60):~ > gdalinfo fargo_e.dem
Driver: USGSDEM/USGS Optional ASCII DEM (and CDED)
Size is 1201, 1201
Coordinate System is:
GEOGCS["NAD27",
DATUM["North_American_Datum_1927",
SPHEROID["Clarke 1866",6378206.4,294.978698213898,
AUTHORITY["EPSG","7008"]],
TOWGS84[-3,142,183,0,0,0,0],
AUTHORITY["EPSG","6267"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9108"]],
AXIS["Lat",NORTH],
AXIS["Long",EAST],
AUTHORITY["EPSG","4267"]]
Origin = (-97.000417,47.000417)
Pixel Size = (0.00083333,-0.00083333)
Metadata:
AREA_OR_POINT=Point
Corner Coordinates:
Upper Left ( -97.0004167, 47.0004167) ( 97d 0'1.50"W, 47d 0'1.50"N)
Lower Left ( -97.0004167, 45.9995833) ( 97d 0'1.50"W, 45d59'58.50"N)
Upper Right ( -95.9995833, 47.0004167) ( 95d59'58.50"W, 47d 0'1.50"N)
Lower Right ( -95.9995833, 45.9995833) ( 95d59'58.50"W, 45d59'58.50"N)
Center ( -96.5000000, 46.5000000) ( 96d30'0.00"W, 46d30'0.00"N)
Band 1 Block=1201x1201 Type=Int16, ColorInterp=Undefined
NoData Value=-32767
Unit Type: m
GRASS 6.1.cvs (spearfish60):~ > r.in.gdal input=fargo_e.dem output=fargo_e loc=tt
A datum name nad27 (North_American_Datum_1927) was specified without
transformation parameters.
Now select Datum Transformation Parameters
Enter 'list' to see the list of available Parameter sets
Enter the corresponding number, or <RETURN> to cancel request
>list
Number Details
---
1 Used in Conterminous United States
(PROJ.4 Params nadgrids=conus)
---
2 Used in Canada
(PROJ.4 Params nadgrids=ntv1_can.dat)
---
3 Used in Alaska
(PROJ.4 Params nadgrids=alaska)
---
4 Used in Hawaii
(PROJ.4 Params nadgrids=hawaii)
---
5 Used in Puerto Rico-Virgin Is.
(PROJ.4 Params nadgrids=prvi)
---
6 Used in St. George Is., AK
(PROJ.4 Params nadgrids=stgeorge)
---
7 Used in St. Lawrence Island, AK
Now select Datum Transformation Parameters
Enter 'list' to see the list of available Parameter sets
Enter the corresponding number, or <RETURN> to cancel request
>1
Segmentation fault
It actually crashes in GDAL:
gdal/frmts/usgsdem/usgsdemdataset.cpp:261:8624:beg:0xb7cb469b
Function USGSDEMRasterBand::IReadBlock
fscanf(poGDS->fp, "%d", &nElev); <- CRASH
gdal_translate fargo_e.dem fargo_e.tif
Input file size is 1201, 1201
0.Segmentation fault
I suggest to report this to the GDAL bugtracker as this is unrelated
to GRASS (r.in.gdal depends on GDAL):
http://bugzilla.remotesensing.org/enter_bug.cgi?product=GDAL
Will close the report here.
Markus
For us I include the backtrace of the debugger:
GRASS 6.1.cvs (spearfish60):~ > gdb `which r.in.gdal`
GNU gdb 6.3-3.1.102mdk (Mandrakelinux)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-mandrake-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".
(gdb) r input=fargo_e.dem output=fargo_e loc=ttt
Starting program:
/home/neteler/soft/61grass_cvsexp/dist.i686-pc-linux-gnu/bin/r.in.gdal
input=fargo_e.dem output=fargo_e loc=ttt
[Thread debugging using libthread_db enabled]
[New Thread -1220322592 (LWP 12651)]
A datum name nad27 (North_American_Datum_1927) was specified without
transformation parameters.
Now select Datum Transformation Parameters
Enter 'list' to see the list of available Parameter sets
Enter the corresponding number, or <RETURN> to cancel request
>1
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1220322592 (LWP 12651)]
0xb78d3640 in _IO_vfscanf () from /lib/tls/libc.so.6
(gdb) bt full
#0 0xb78d3640 in _IO_vfscanf () from /lib/tls/libc.so.6
No symbol table info available.
#1 0xb78d6fa1 in vfscanf () from /lib/tls/libc.so.6
No symbol table info available.
#2 0xb78db7cf in fscanf () from /lib/tls/libc.so.6
No symbol table info available.
#3 0xb7cb469b in USGSDEMRasterBand::IReadBlock (this=0x8086498, nBlockXOff=0,
nBlockYOff=0, pImage=0xb7131008) at usgsdemdataset.cpp:261
iY = 47572
nElev = 2147483647
nCPoints = 302325
lygap = -55090
dyStart = 0.090555555555555556
njunk = 326
dfElevOffset = 26
dfYMin = 46
poGDS = (USGSDEMDataset *) 0x8085470
#4 0xb7ccdc61 in GDALRasterBand::GetLockedBlockRef (this=0x8086498, nXBlockOff=0,
nYBlockOff=0, bJustInitialize=0) at gdal_priv.h:451
poBlock = (class GDALRasterBlock *) 0x8086330
#5 0xb7cd2be0 in GDALRasterBand::IRasterIO (this=0x8086498, eRWFlag=GF_Read,
nXOff=0,
nYOff=0, nXSize=1201, nYSize=1, pData=0x809a378, nBufXSize=1201, nBufYSize=1,
eBufType=GDT_Int32, nPixelSpace=4, nLineSpace=4804) at rasterio.cpp:187
bJustInitialize = 0
#6 0xb7ccd0db in GDALRasterBand::RasterIO (this=0x8086498, eRWFlag=GF_Read,
nXOff=0,
nYOff=0, nXSize=1201, nYSize=1, pData=0x809a378, nBufXSize=1201, nBufYSize=1,
eBufType=GDT_Int32, nPixelSpace=50, nLineSpace=0) at gdalrasterband.cpp:370
No locals.
#8 0x0804dda4 in ImportBand (hBand=0x8086498, output=0x807f4b0 "fargo_e",
group_ref=0x0) at main.c:769
data_type = 0
eGDT = GDT_Int32
eRawGDT = GDT_Int16
row = 1
nrows = 1201
ncols = 1201
complex = 0
cf = 10
cfR = -1211364934
cfI = 134763632
bNoDataEnabled = 1
indx = -1073756216
cell = (CELL *) 0x809a378
cellReal = (CELL *) 0x0
cellImg = (CELL *) 0xb7ec78d8
bufComplex = (float *) 0xb7b2a138
dfNoData = -32767
msg =
"Éú²·\\\230¥·\000\000\000\000Õ\022\000\000ô\017\233·8¡²·\020£þ·\b\025\000ž` \004\b\000(\233·:*\000\0
00ô\017\000ž\020£þ·8K²·\020£þ·\024pÿ·Œ€þ·\000\000\000\000\001\000\000\000ô\017\000ž\020£þ·Œ€þ·\220Çÿ
¿\024pÿ·Œ€þ·"
outputReal =
"üQ³güQ³_šÆÿ¿\236:ÿ·üQ³·Éú²·$(\233·\001\000\233·\004AŽ\000\004AŽ\000ÈÆÿ¿\001\000ÿ·\004AŽ·`
\004\b\"\000\000\000\001ÿY·\000\000\000\000\000\000\000\000r4¶·ž
nullFlags = 0x809b648 ""
raster_open_new_func = (int (*)(char *,
RASTER_MAP_TYPE)) 0x804bd08 <G_open_raster_new>
#9 0x0804cfa2 in main (argc=4, argv=0xbffff224) at main.c:400
nBand = 1
input = 0x807f4a0 "fargo_e.dem"
output = 0x807f4b0 "fargo_e"
title = 0x0
cellhd = {format = 134518308, compressed = -1073745564, rows = 1201,
rows3 = 1201, cols = 1201, cols3 = 1201, depths = 1, proj = 3, zone = 0,
ew_res = 0.00083333333333333274, ew_res3 = 0.00083333333333333339,
ns_res = 0.00083333333333333274, ns_res3 = 0.00083333333333333339, tb_res =
1,
north = 47.000416666666666, south = 45.999583333333334, east =
-95.999583333333334,
west = -97.000416666666666, top = 1, bottom = 0}
loc_wind = {format = 9026129, compressed = 9026129, rows = -1073745672,
rows3 = -1208009822, cols = -1215710639, cols3 = 134526151, depths =
-1220320000,
proj = 1, zone = -1207953824, ew_res = 4.6243264657307388e+25,
ew_res3 = -1.9963113672856712, ns_res = 0, ns_res3 = 1.5810100666919889e-322,
tb_res = -3.6921849843800382e-41, north = -3.5712107060937374e-41,
south = 7.3669781198337224e-313, east = -1.7376767617394128e-42,
west = 4.8847621316964883e-270, top = -5.9100531695484757e-39,
bottom = -1.9964981133816511}
def_wind = {format = 9026129, compressed = 9026129, rows = -1073745800,
rows3 = -1208009822, cols = -1215710639, cols3 = -1217068746, depths =
-1220320000,
proj = 1, zone = 0, ew_res = 0, ew_res3 = 9.8813129168249309e-324, ns_res =
0,
ns_res3 = 1.5810100666919889e-322, tb_res = -3.6921849843800382e-41,
north = -3.5712107060937374e-41, south = 7.3669781198337224e-313,
east = -1.7413770654967705e-42, west = -1.3915868384532291e-41,
top = 1.1031950331170474e+217, bottom = -5.7867846220423817e-39}
proj_info = (struct Key_Value *) 0x808fa88
proj_units = (struct Key_Value *) 0x808faa0
loc_proj_info = (struct Key_Value *) 0x0
loc_proj_units = (struct Key_Value *) 0x0
hDS = 0x8085470
hDriver = 0x80843e8
hBand = 0x8086498
adfGeoTransform = {-97.000416666666666, 0.00083333333333333339, 0,
47.000416666666666, 0, -0.00083333333333333339}
force_imagery = 0
error_msg = '\0' <repeats 1384 times>,
"=\000\000\000=\000\000\000\214Õÿ¿\231\201ÿ·ä€C·<n\200·ô\017\000žà\021\000žä€C·ð×ÿ¿\226%ÿ·\000\000\0
00\000
\020\000ž", '\0' <repeats 28 times>,
"Æ\215\233·\000\000\000\000\000\000\000\000ä€C·\220úY·", '\0' <repeats 36
times>,
"=\000\000\000=\000\000\000\024Öÿ¿\231\201ÿ·4¶D·LR\233·ô\017\000ž\000P\233·4¶D·xØÿ¿\226%ÿ·\000\000\0
00\000
\020\000ž", '\0' <repeats 28 times>,
"Æ\215\233·\000\000\000\000\000\000\000\0004¶D·À÷Y·", '\0' <repeats 24 times>,
"=\000\000\000=\000"...
projcomp_error = 0
module = (struct GModule *) 0xb7b034ec
parm = {input = 0xb7b034a0, output = 0x807f248, target = 0x807f2f8,
title = 0x807f358, outloc = 0x807f3b8, band = 0x807f298}
flag_o = (struct Flag *) 0xb7b03480
flag_e = (struct Flag *) 0x807f428
flag_k = (struct Flag *) 0x807f478
flag_f = (struct Flag *) 0x807f450
(gdb)
|
|