[GRASS-user] Error in r.in.gdal: CPLCalloc(): Out of memory allocating for "EHdr/ESRI .hdr Labelled" driver

Patton, Eric epatton at nrcan.gc.ca
Wed Apr 11 14:42:35 EDT 2007


Frank,

Thanks for the feedback. The error persists with gdalinfo -mm:

$ gdalinfo -mm 45_18_N_66_06_W_BACKSCATTER.flt

Driver: EHdr/ESRI .hdr Labelled
Size is 2641, 3721
Coordinate System is `'
Origin = (2531369.500000000000000,7366720.500000000000000)
Pixel Size = (1.000000000000000,-1.000000000000000)
Corner Coordinates:
Upper Left  ( 2531369.500, 7366720.500) 
Lower Left  ( 2531369.500, 7362999.500) 
Upper Right ( 2534010.500, 7366720.500) 
Lower Right ( 2534010.500, 7362999.500) 
Center      ( 2532690.000, 7364860.000) 
Band 1 Block=2641x1 Type=Byte, ColorInterp=Undefined
ERROR 2: CPLCalloc(): Out of memory allocating -329 bytes.

  Aborted (core dumped)

Filing a bug in the gdal bugtracker.

~ Eric.


-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com]
Sent: Wed 4/11/2007 3:54 PM
To: Patton, Eric
Cc: grassuser at grass.itc.it
Subject: Re: [GRASS-user] Error in r.in.gdal: CPLCalloc(): Out of memory	allocating for "EHdr/ESRI .hdr Labelled" driver
 
Patton, Eric wrote:
> I'm trying to import a pile of Arc floating point binary rasters (.flt and .hdr extensions) with r.in.gdal:
> 
> 
> $ r.in.gdal input=45_18_N_66_06_W_BACKSCATTER.flt output=45_18_N_66_06_W -oe
> WARNING: Over-riding projection check.
> ERROR 2: CPLCalloc(): Out of memory allocating -329 bytes.
> 
> Aborted (core dumped)
...
> I'm using a fresh install of GDAL 1.4.1, along with a fresh 6.3 cvs update from today. I see that at 1m resolution, the output raster would be 9,827,161 cells in size - pretty big. Is this the source of the CPLCalloc error? 
> 
> Can anything be done as a workaround, i.e., using gdal tools to reduce the resolution of the output raster on the fly? I have 350 of these rasters to import.

Eric,

This isn't a big raster, so that's not the problem.  Can you try
"gdalinfo -mm" on the same file?  Negative allocation errors normally
mean a bug somewhere in the driver code.  If gdalinfo -mm also has
a similar error, then file a bug against GDAL and ensure you include
the .flt header (the data itself should not be needed).

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org






More information about the grass-user mailing list