1

We have been using GDAL 1.9 for years on a Ubuntu 12.04 machine, but are trying to upgrade to Ubuntu 16.04 with the latest PostGIS and GDAL. When I install gdal-bin I end up with version 2.1.3. But using ogrinfo fails in the new environment, while it still works fine on the same data on the old machine. This is what happens on the new machine:

rauser1@raserver:~$ ogrinfo /projects/t48/overlays/res_t48
ERROR 3: EOF encountered in /projects/t48/overlays/res_t48/../info/arc.dir 
after reading 0 bytes while trying to read 32 bytes. File may be corrupt.
ERROR 4: Failed to open table res_t48.PAT
ERROR 3: EOF encountered in /projects/t48/overlays/res_t48/../info/arc.dir 
after reading 0 bytes while trying to read 32 bytes. File may be corrupt.
ERROR 4: Failed to open table res_t48.PAT
Had to open data source read-only.
INFO: Open of `/projects/t48/overlays/res_t48'
  using driver `AVCBin' successful.
1: ARC (Line String)
2: CNT (Point)
3: LAB (Point)
4: PAL (Polygon)

This processes fine using the same data in the 1.9 environment so the data is not corrupt as the error suggests.

Could someone point me in the right direction?

  • You're looking at a coverage, hence the PAT (Poly/Point attribute table).. coverage workspaces are really easy to break. Is there an info directory in /projects/t48/overlays/? Does the arc.dir file exist and contain information? Does your process have permission? The error appears to say that it could open the files but read-only.. – Michael Stimson Aug 23 '17 at 23:42
  • 1
    Is there actually a problem? Last line states "INFO: Open of /projects/t48/overlays/res_t48' using driver AVCBin' successful." – user2856 Aug 23 '17 at 23:54
  • Thanks for the quick response @Michael Yes, the ancient coverage actually works, on the old system, and it does report that it can only open read-only on both. – Tom Haws Aug 24 '17 at 0:18
  • @Luke, even though it says it is "successful", it does not read any layer information on the gdal 2 version, but the 1.9 version does. – Tom Haws Aug 24 '17 at 0:23
  • Sounds to me like a bug.. Is there any chance of putting the workspace onto a Windows workstation? I can see that the process is trying to access ../info/arc.dir as a relative path, does Linux recognize the ..\ ? Sorry I have almost no experience with Linux. – Michael Stimson Aug 24 '17 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.