[gdal-dev] using gdal_merge with floating images
Andrea Peri
aperi2007 at gmail.com
Mon Jul 27 23:19:59 PDT 2015
Hi Even, you have right.
It is not really a crash with closing of the putty console (it
happened for another distinct and indipendent error), but
it is an error reported in the console.
AFAIK The error reported is effectively due to a memory error.
This is the error reported me:
0Traceback (most recent call last):
File "/usr/local/bin/gdal_merge.py", line 523, in <module>
sys.exit(main())
File "/usr/local/bin/gdal_merge.py", line 512, in main
fi.copy_into( t_fh, band, t_band, nodata )
File "/usr/local/bin/gdal_merge.py", line 253, in copy_into
nodata_arg )
File "/usr/local/bin/gdal_merge.py", line 71, in raster_copy
m_band )
File "/usr/local/bin/gdal_merge.py", line 110, in raster_copy_with_mask
data_dst = t_band.ReadAsArray( t_xoff, t_yoff, t_xsize, t_ysize )
File "/usr/local/lib/python2.7/dist-packages/GDAL-2.0.0-py2.7-linux-x86_64.egg/osgeo/gdal.py",
line 1302, in ReadAsArray
callback_data = callback_data)
File "/usr/local/lib/python2.7/dist-packages/GDAL-2.0.0-py2.7-linux-x86_64.egg/osgeo/gdal_array.py",
line 325, in BandReadAsArray
buf_obj = numpy.empty([buf_ysize,buf_xsize], dtype = typecode)
MemoryError
Now I try to use the gdal_warp to merge these rasters.
Thx again.
Andrea.
2015-07-27 19:37 GMT+02:00 Even Rouault <even.rouault at spatialys.com>:
> On Sunday 26 July 2015 00:40:48 Andrea Peri wrote:
>> Hi,
>> I'm try-ing to merging some rasters using gdal_merge.
>> The raster are all float64 and with differents interval of values.
>> Is this kind of rasters compatible with gdal_merge ?
>>
>> I ask because , my try was stopped with a crash.
>
> gdal_merge should be able to work with any data type as far as I can see. It
> could have issues with rasters that don't fit into RAM, but this should result
> in a "clean" error, not a process termination.
>
> You can try with gdalwarp as well
>
>>
>> And perhaps this could be the explanation.
>>
>> Many thx.
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
More information about the gdal-dev
mailing list