[gdal-dev] Reading ArcInfo binary grids with the R rgdalpackage fails with "GDAL Error 3: Attempt to read past EOF in..../arc.dir"

Jason Roberts jason.roberts at duke.edu
Wed Jul 22 13:14:40 EDT 2009


Thanks Matt, that is very interesting to know that the Python bindings fail
with the same problem. Which version of GDAL are you using with the Python
bindings?

> So it seems like either all bindings need to silently ignore this error
> or have it fixed in the GDAL source.

Even and other GDAL devs, can you advise us on this?

Thanks,

Jason

-----Original Message-----
From: Gregory, Matthew [mailto:matt.gregory at oregonstate.edu] 
Sent: Wednesday, July 22, 2009 12:09 PM
To: Jason Roberts
Cc: gdal-dev
Subject: RE: [gdal-dev] Reading ArcInfo binary grids with the R rgdalpackage
fails with "GDAL Error 3: Attempt to read past EOF in..../arc.dir"

Hi Jason,

Jason Roberts wrote:
> Markus - thanks for the links to those tickets. Those tickets 
> seem to imply this is a minor annoyance. Unfortunately, for 
> me, it means I can't read the grids at all from R. Perhaps if 
> I was using the C interface there would be a workaround (just 
> ignore the error?) but this is not possible using the R 
> interface, as far as I can tell. For example, the rgdal 
> GDAL.open API fails with the same message.

I was one of the people that wrote up a ticket on this.  Ironically, it
looks like it was a bug fix that Even implemented (rev. 16460) that
allowed the INFO directory to be read correctly (so that the VAT is
read), which exposed the source of these errors.  

> Is the right solution to get the rgdal developers to code a 
> workaround to ignore the error somehow? Or is it to determine 
> the underlying problem in GDAL? Or perhaps ESRI is generating 
> grids that violate the AIG format specification?

I hadn't worked with this outside of the C interface, but I'm noticing
now that the same problems crop up in the Python bindings:

  >>> from osgeo import gdal
  >>> ds = gdal.Open("D:/matt/vat_test/grid1")
  ERROR 3: Attempt to read past EOF in
D:/matt/vat_test/grid1/../info/../grid1/vat
  .adf.
  >>> type(ds)
  <type 'NoneType'>

So it seems like either all bindings need to silently ignore this error
or have it fixed in the GDAL source.  I'll admit that my understanding
of what really needs to happen is often shaky ...

matt



More information about the gdal-dev mailing list