> Are you sure you are using a 64bit GDAL ? AFAIR, OSGeo4W is 32bit only.
>

Thx for response.

I download the gdal 64bit version.
explode it on a single folder.
I use osgeo shell only as environment for python and go in the folder gdal64 to call its gdal_merge.py.
I guess the libraries used was from gdal64,
but effectively the memory issue is on numpy, a python element

> Anyway, it is known that gdal_merge.py is limited by memory in the
>way it
> operates. You might want to use gdalwarp or gdalbuildvrt in that case.
>

Unfortunately gdalbuildvrt is not useful for my need.
I need to produce 1 really physical raster.

But gdalwarp is a tool I never will think to use for this.
Is gdalwarp capable to merge raster ?

Thx,


Il 05/09/2011 19:24, Even Rouault ha scritto:
Le lundi 05 septembre 2011 09:55:52, aperi2007 a écrit :
Hi,
I'm try-ing to merge some tiff4 raster.

The call I'm using (thx Frank and Etienne) is these:

python gdal_merge.py -o ../raster/raster_1.tif -n 0 -ot Byte -pct
../raster/raster_1/*.tif
gdal_translate -co NBITS=1 -co COMPRESS=CCITTFAX4 -co TFW=YES
../raster/raster_1.tif ../raster/raster_2.tif

I firstly merge they with gdal_merge.py and after I translate they in a
CTTIFF4 1 bit color.

On a little test it work very well.

But when I apply it to all set of raster it give me this memory error.

------

D:\_fusion_raster_bw\gdal64bit>python gdal_merge.py -o
../raster/livorno0.tif -n
   0 -ot Byte -pct ../raster/livorno/*.tif
0...10Traceback (most recent call last):
    File "gdal_merge.py", line 513, in<module>
      sys.exit(main())
    File "gdal_merge.py", line 499, in main
      fi.copy_into( t_fh, band, band, nodata )
    File "gdal_merge.py", line 242, in copy_into
      nodata_arg )
    File "gdal_merge.py", line 62, in raster_copy
      nodata )
    File "gdal_merge.py", line 102, in raster_copy_with_nodata
      to_write = Numeric.choose( nodata_test, (data_src, data_dst) )
    File
"C:\OSGeo4W\apps\Python25\lib\site-packages\numpy\core\fromnumeric.py", l
ine 170, in choose
      return choose(choices, out=out, mode=mode)
MemoryError

------

I don't know if this is a know issue or a problem of python configuration.

I'm working on a windows7 64 bit, and I'm using a gdal 64bit version.

Are you sure you are using a 64bit GDAL ? AFAIR, OSGeo4W is 32bit only.

Anyway, it is known that gdal_merge.py is limited by memory in the way it
operates. You might want to use gdalwarp or gdalbuildvrt in that case.



_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to