[GRASS-user] ERROR: Bytes do not match file size with r.in.bin (but file size is correct!!)

Hamish hamish_b at yahoo.com
Thu May 9 18:48:50 PDT 2013


>> G6> r.in.bin -f input=lfs_test.bin output=outputmap bytes=4 \
>>       n=51:05:20.4N s=41:21:50.4N w=5:08:31.2W e=9:33:36E \
>>       r=19450 c=29404 anull=-9999.0
>>
>> WARNING: File Size -2007336096 ... Total Bytes 2287631200
>> ERROR: Bytes do not match file size

Ludovico wrote:
> In my case the problem is not the fortran record markers,
> indeed the files are exactly the size they are supposed to be.

Hi, I just tested, it's still a bug in 6.4.3svn and devbr6.

filed as  https://trac.osgeo.org/grass/ticket/1971


It does import ok in GRASS 7; the r.in.bin module is essentially
the same, the difference is that GRASS 6's G_ftell() function returns
plain integer instead of off_t, and GRASS 7 defines 
  LFS_CFLAGS = -D_FILE_OFFSET_BITS=64
so the PRI_OFF_T test in gis.h gets set to "lld", but GRASS 6 doesn't
so the error message format gets set to "ld".


> PS. Hamish I will probably switch to 6.4.3rc3 anyway, would this
> solve the problem automatically in your opinion?

partly I'm just fishing for testers :), I hope we can commit a fix
for this very soon, but for now you could always build the GRASS 7
development code, import the raster map, and then fall back to the
stable version to work with it.


thanks for reporting it,
Hamish


More information about the grass-user mailing list