Jan,<br><br>The first error message is because of the block size. The entire image is taken as a block; not good for large rasters. When copying, GDAL tries to load the entire block into the memory.<br><br>It&#39;s very likely that the problem will be resolved if we create copies of the gtiffs with smaller blocks. Use gdal_translate with the -co option[1] to set the BLOCKXSIZE and BLOCKYSIZE [2] of the output image. Since the datatype of the gtiffs is byte set them both to 1024. Decrease it to 512 or 256 if the problem persists.<br>
<br>[1]: <a href="http://www.gdal.org/gdal_translate.html">http://www.gdal.org/gdal_translate.html</a><br>[2]: <a href="http://www.gdal.org/frmt_gtiff.html">http://www.gdal.org/frmt_gtiff.html</a><br><br><div class="gmail_quote">
On Fri, Aug 26, 2011 at 6:31 PM, Jan Tappenbeck <span dir="ltr">&lt;<a href="mailto:tappenbeck@widemann.de">tappenbeck@widemann.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
<br>
 hi !<br>
<br>
i have got two images to merge and convert into ecw - but i only get a error-message and a black image.<br>
<br>
i send following command:<br>
<br>
<br>
gdal_merge.bat -of GTiff -o D:/GDAL_Projekte/xxxxxxxxxx/<u></u>xxxxxxxxxx_gesamt.tif D:/GDAL_Projekte/xxxxxxxxxx/<u></u>xxxxxxxxxx_300_nord_geo.tif D:/GDAL_Projekte/xxxxxxxxxx/<u></u>xxxxxxxxxx_300_sued_geo.tif<br>
<br>
gdal_translate -of ECW -co LARGE_OK=YES D:/GDAL_Projekte/xxxxxxxxxx/<u></u>xxxxxxxxxx_gesamt.tif D:/GDAL_Projekte/xxxxxxxxxx/<u></u>xxxxxxxxxx_gesamt.ecw<br>
<br>
and here are the image-infos and the message - can anybody help me?<br>
<br>
reagards Jan :-)<br>
<br>
C:\Program Files (x86)\FWTools2.4.7&gt;gdalinfo D:/GDAL_Projekte/XXXXXXX/<u></u>XXXXXXX_<br>
300_nord_geo.tif<br>
Driver: GTiff/GeoTIFF<br>
Files: D:/GDAL_Projekte/XXXXXXX/<u></u>XXXXXXX_300_nord_geo.tif<br>
       D:/GDAL_Projekte/XXXXXXX/<u></u>XXXXXXX_300_nord_geo.tfw<br>
Size is 25848, 19395<br>
Coordinate System is:<br>
PROJCS[&quot;unnamed&quot;,<br>
    GEOGCS[,<br>
        DATUM[&quot;unknown&quot;,<br>
            SPHEROID[&quot;unretrievable - using WGS84&quot;,6378137,298.257223563]]<u></u>,<br>
        PRIMEM[&quot;Greenwich&quot;,0],<br>
        UNIT[,0.0174532925199433]],<br>
    UNIT[&quot;unknown&quot;,1]]<br>
Origin = (3551283.342142190800000,<u></u>5917001.142321675100000)<br>
Pixel Size = (0.423322208955370,-0.<u></u>423342973054873)<br>
Metadata:<br>
  TIFFTAG_SOFTWARE=WGEO 3.0.0.69 VKB KAWinsen2<br>
  TIFFTAG_XRESOLUTION=300<br>
  TIFFTAG_YRESOLUTION=300<br>
  AREA_OR_POINT=Area<br>
Image Structure Metadata:<br>
  COMPRESSION=PACKBITS<br>
  INTERLEAVE=BAND<br>
  MINISWHITE=YES<br>
Corner Coordinates:<br>
Upper Left  ( 3551283.342, 5917001.142)<br>
Lower Left  ( 3551283.342, 5908790.405)<br>
Upper Right ( 3562225.375, 5917001.142)<br>
Lower Right ( 3562225.375, 5908790.405)<br>
Center      ( 3556754.358, 5912895.774)<br>
Band 1 Block=25848x19393 Type=Byte, ColorInterp=Palette<br>
  Image Structure Metadata:<br>
    NBITS=1<br>
  Color Table (RGB with 2 entries)<br>
    0: 255,255,255,255<br>
    1: 0,0,0,255<br>
<br>
C:\Program Files (x86)\FWTools2.4.7&gt;gdalinfo D:/GDAL_Projekte/XXXXXXX/<u></u>XXXXXXX_<br>
300_sued_geo.tif<br>
Driver: GTiff/GeoTIFF<br>
Files: D:/GDAL_Projekte/XXXXXXX/<u></u>XXXXXXX_300_sued_geo.tif<br>
       D:/GDAL_Projekte/XXXXXXX/<u></u>XXXXXXX_300_sued_geo.tfw<br>
Size is 25849, 19394<br>
Coordinate System is:<br>
PROJCS[&quot;unnamed&quot;,<br>
    GEOGCS[,<br>
        DATUM[&quot;unknown&quot;,<br>
            SPHEROID[&quot;unretrievable - using WGS84&quot;,6378137,298.257223563]]<u></u>,<br>
        PRIMEM[&quot;Greenwich&quot;,0],<br>
        UNIT[,0.0174532925199433]],<br>
    UNIT[&quot;unknown&quot;,1]]<br>
Origin = (3551215.913367207200000,<u></u>5909585.856755478300000)<br>
Pixel Size = (0.423327969973589,-0.<u></u>423338937597159)<br>
Metadata:<br>
  TIFFTAG_SOFTWARE=WGEO 3.0.0.69 VKB KAWinsen2<br>
  TIFFTAG_XRESOLUTION=300<br>
  TIFFTAG_YRESOLUTION=300<br>
  AREA_OR_POINT=Area<br>
Image Structure Metadata:<br>
  COMPRESSION=PACKBITS<br>
  INTERLEAVE=BAND<br>
  MINISWHITE=YES<br>
Corner Coordinates:<br>
Upper Left  ( 3551215.913, 5909585.857)<br>
Lower Left  ( 3551215.913, 5901375.621)<br>
Upper Right ( 3562158.518, 5909585.857)<br>
Lower Right ( 3562158.518, 5901375.621)<br>
Center      ( 3556687.216, 5905480.739)<br>
Band 1 Block=25849x19393 Type=Byte, ColorInterp=Palette<br>
  Image Structure Metadata:<br>
    NBITS=1<br>
  Color Table (RGB with 2 entries)<br>
    0: 255,255,255,255<br>
    1: 0,0,0,255<br>
<br>
C:\Program Files (x86)\FWTools2.4.7&gt;D:\GDAL_<u></u>Projekte\XXXXXXX\XXXXXXX.bat<br>
<br>
C:\Program Files (x86)\FWTools2.4.7&gt;gdal_merge.<u></u>bat -of GTiff -o D:/GDAL_Projekte<br>
/XXXXXXX/XXXXXXX_gesamt.tif D:/GDAL_Projekte/XXXXXXX/<u></u>XXXXXXX_300_nord_geo.ti<br>
f D:/GDAL_Projekte/XXXXXXX/<u></u>XXXXXXX_300_sued_geo.tif<br>
ERROR 4: `D:/GDAL_Projekte/XXXXXXX/<u></u>XXXXXXX_gesamt.tif&#39; not recognised as a sup<br>
ported file format.<br>
<br>
0ERROR 2: GDALRasterBlock::Internalize : Out of memory allocating 501270264 byte<br>
s.<br>
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 1<br>
Traceback (most recent call last):<br>
  File &quot;C:\PROGRA~2\FWTOOL~1.7\bin\<u></u>gdal_merge.py&quot;, line 472, in ?<br>
    sys.exit(main())<br>
  File &quot;C:\PROGRA~2\FWTOOL~1.7\bin\<u></u>gdal_merge.py&quot;, line 459, in main<br>
    fi.copy_into( t_fh, band, band, nodata )<br>
  File &quot;C:\PROGRA~2\FWTOOL~1.7\bin\<u></u>gdal_merge.py&quot;, line 231, in copy_into<br>
    nodata_arg )<br>
  File &quot;C:\PROGRA~2\FWTOOL~1.7\bin\<u></u>gdal_merge.py&quot;, line 62, in raster_copy<br>
    t_xsize, t_ysize, t_band.DataType )<br>
  File &quot;C:\PROGRA~2\FWTOOL~1.7\pymod\<u></u>gdal.py&quot;, line 851, in ReadRaster<br>
    buf_xsize, buf_ysize,buf_type)<br>
TypeError: GetBlockRef failed at X block offset 0, Y block offset 1<br>
<br>
______________________________<u></u>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>