[gdal-dev] Problem to merge 2 images

Jan Tappenbeck tappenbeck at widemann.de
Fri Aug 26 09:01:45 EDT 2011



  hi !

i have got two images to merge and convert into ecw - but i only get a 
error-message and a black image.

i send following command:


gdal_merge.bat -of GTiff -o 
D:/GDAL_Projekte/xxxxxxxxxx/xxxxxxxxxx_gesamt.tif 
D:/GDAL_Projekte/xxxxxxxxxx/xxxxxxxxxx_300_nord_geo.tif 
D:/GDAL_Projekte/xxxxxxxxxx/xxxxxxxxxx_300_sued_geo.tif

gdal_translate -of ECW -co LARGE_OK=YES 
D:/GDAL_Projekte/xxxxxxxxxx/xxxxxxxxxx_gesamt.tif 
D:/GDAL_Projekte/xxxxxxxxxx/xxxxxxxxxx_gesamt.ecw

and here are the image-infos and the message - can anybody help me?

reagards Jan :-)

C:\Program Files (x86)\FWTools2.4.7>gdalinfo 
D:/GDAL_Projekte/XXXXXXX/XXXXXXX_
300_nord_geo.tif
Driver: GTiff/GeoTIFF
Files: D:/GDAL_Projekte/XXXXXXX/XXXXXXX_300_nord_geo.tif
        D:/GDAL_Projekte/XXXXXXX/XXXXXXX_300_nord_geo.tfw
Size is 25848, 19395
Coordinate System is:
PROJCS["unnamed",
     GEOGCS[,
         DATUM["unknown",
             SPHEROID["unretrievable - using WGS84",6378137,298.257223563]],
         PRIMEM["Greenwich",0],
         UNIT[,0.0174532925199433]],
     UNIT["unknown",1]]
Origin = (3551283.342142190800000,5917001.142321675100000)
Pixel Size = (0.423322208955370,-0.423342973054873)
Metadata:
   TIFFTAG_SOFTWARE=WGEO 3.0.0.69 VKB KAWinsen2
   TIFFTAG_XRESOLUTION=300
   TIFFTAG_YRESOLUTION=300
   AREA_OR_POINT=Area
Image Structure Metadata:
   COMPRESSION=PACKBITS
   INTERLEAVE=BAND
   MINISWHITE=YES
Corner Coordinates:
Upper Left  ( 3551283.342, 5917001.142)
Lower Left  ( 3551283.342, 5908790.405)
Upper Right ( 3562225.375, 5917001.142)
Lower Right ( 3562225.375, 5908790.405)
Center      ( 3556754.358, 5912895.774)
Band 1 Block=25848x19393 Type=Byte, ColorInterp=Palette
   Image Structure Metadata:
     NBITS=1
   Color Table (RGB with 2 entries)
     0: 255,255,255,255
     1: 0,0,0,255

C:\Program Files (x86)\FWTools2.4.7>gdalinfo 
D:/GDAL_Projekte/XXXXXXX/XXXXXXX_
300_sued_geo.tif
Driver: GTiff/GeoTIFF
Files: D:/GDAL_Projekte/XXXXXXX/XXXXXXX_300_sued_geo.tif
        D:/GDAL_Projekte/XXXXXXX/XXXXXXX_300_sued_geo.tfw
Size is 25849, 19394
Coordinate System is:
PROJCS["unnamed",
     GEOGCS[,
         DATUM["unknown",
             SPHEROID["unretrievable - using WGS84",6378137,298.257223563]],
         PRIMEM["Greenwich",0],
         UNIT[,0.0174532925199433]],
     UNIT["unknown",1]]
Origin = (3551215.913367207200000,5909585.856755478300000)
Pixel Size = (0.423327969973589,-0.423338937597159)
Metadata:
   TIFFTAG_SOFTWARE=WGEO 3.0.0.69 VKB KAWinsen2
   TIFFTAG_XRESOLUTION=300
   TIFFTAG_YRESOLUTION=300
   AREA_OR_POINT=Area
Image Structure Metadata:
   COMPRESSION=PACKBITS
   INTERLEAVE=BAND
   MINISWHITE=YES
Corner Coordinates:
Upper Left  ( 3551215.913, 5909585.857)
Lower Left  ( 3551215.913, 5901375.621)
Upper Right ( 3562158.518, 5909585.857)
Lower Right ( 3562158.518, 5901375.621)
Center      ( 3556687.216, 5905480.739)
Band 1 Block=25849x19393 Type=Byte, ColorInterp=Palette
   Image Structure Metadata:
     NBITS=1
   Color Table (RGB with 2 entries)
     0: 255,255,255,255
     1: 0,0,0,255

C:\Program Files (x86)\FWTools2.4.7>D:\GDAL_Projekte\XXXXXXX\XXXXXXX.bat

C:\Program Files (x86)\FWTools2.4.7>gdal_merge.bat -of GTiff -o 
D:/GDAL_Projekte
/XXXXXXX/XXXXXXX_gesamt.tif D:/GDAL_Projekte/XXXXXXX/XXXXXXX_300_nord_geo.ti
f D:/GDAL_Projekte/XXXXXXX/XXXXXXX_300_sued_geo.tif
ERROR 4: `D:/GDAL_Projekte/XXXXXXX/XXXXXXX_gesamt.tif' not recognised as 
a sup
ported file format.

0ERROR 2: GDALRasterBlock::Internalize : Out of memory allocating 
501270264 byte
s.
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 1
Traceback (most recent call last):
   File "C:\PROGRA~2\FWTOOL~1.7\bin\gdal_merge.py", line 472, in ?
     sys.exit(main())
   File "C:\PROGRA~2\FWTOOL~1.7\bin\gdal_merge.py", line 459, in main
     fi.copy_into( t_fh, band, band, nodata )
   File "C:\PROGRA~2\FWTOOL~1.7\bin\gdal_merge.py", line 231, in copy_into
     nodata_arg )
   File "C:\PROGRA~2\FWTOOL~1.7\bin\gdal_merge.py", line 62, in raster_copy
     t_xsize, t_ysize, t_band.DataType )
   File "C:\PROGRA~2\FWTOOL~1.7\pymod\gdal.py", line 851, in ReadRaster
     buf_xsize, buf_ysize,buf_type)
TypeError: GetBlockRef failed at X block offset 0, Y block offset 1



More information about the gdal-dev mailing list