I am working on an assignment which requires me to connect to a database, then import a dbf file into the database using the command db.in.ogr (as can be seen below). However, GRASS simply won't import the dbf file. Is there something wrong with the file perhaps? I know for a fact that the file is there, so the problem must be another.

(Sun May 27 09:40:58 2012)
db.in.ogr --verbose dsn=C:\datasource\clc2000\CLC2000LEGEND.DBF output=landcover_legend GRASS_INFO_ERROR(4804,1): Unable to open data source ERROR: Input table not found or not readable (Sun May 27 09:41:00 2012) Command finished (1 sec)

  • can you open the dbf-file with another tool (libre-office..)? – Kurt May 27 '12 at 8:46
  • Further to what Kurt says, can you try importing a different file, to see if that works? If so, perhaps your .dbf is corrupt? – Darren Cope May 27 '12 at 13:20
  • Hi Kurt, yes I can. In fact I tried saving it also as xml and csv, but grass still wont import them. – Jeremy Azzopardi May 27 '12 at 16:34
  • Is the file online available for a test? – markusN Jun 16 '12 at 8:40
  • did you try it using Grass GUI? – vinayan Aug 27 '12 at 0:55

Try reducing the file name to less than 10 characters and start with a letter, e.g. cl2000.dbf

| improve this answer | |

I guess that you are on a case sensitive system. Try importing as "clc2000legend.dbf" (not "CLC2000LEGEND.DBF").

| improve this answer | |
  • Hi, that didn't work either. Still the same error... – Jeremy Azzopardi Jun 7 '12 at 7:31

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.