Opened 13 years ago

Last modified 9 years ago

#1445 new defect

v.in.ogr cannot insert apparently valid text into DBF row

Reported by: arencambre Owned by: grass-dev@…
Priority: major Milestone: 6.4.6
Component: Vector Version: 6.4.1
Keywords: Cc:
CPU: x86-64 Platform: MSWindows 7

Description

On a Postgres/PostGIS DB import, v.in.ogr bombs with this: DBMI-DBF driver error: Cannot insert new row: insert into pointdata values ([a bunch of comma-separated values are here])

(Yes, there's no useful error details. I've filed #1439 separately about that.)

I took the comma-separated values and put them into Excel, transposing into a column. I also opened the DBF corresponding to this with LibreOffice Calc. I copied the field names and info, which appear to be the first row of the DBF spreadsheet. I have those in the Excel spreadsheet, too, next to the data that caused the error.

The DBF file was created by v.in.ogr during the import.

Comparing each column type to its proposed input value, I cannot find a single instance where invalid or problematic data was being inserted with one possible exception: v.in.ogr converted the Postgres column Crash_Time of type time without time zone as Crash_Time,N,11,0 in the DBF. The value it was trying to insert here is 18:40:00. However, since v.in.ogr declined to provide an error, I have no way to know whether this is why the problem happened.

I've attached the Excel spreadsheet and DBF file to this issue.

Explanation of the columns in the Excel spreadsheet:

  • GRASS DBF column header: the value from the first row of the DBF
  • Data to be inserted: the data that v.in.ogr was trying to insert when it bombed.
  • Length: The length from the column header
  • Field type: The field type from the column header
  • Field name: The name of the field, from the column header
  • ?: The last value in the column header. I don't know what this means.

Attachments (2)

grass diagnosis.xlsx (18.6 KB ) - added by arencambre 13 years ago.
pointdata.dbf (4.6 KB ) - added by arencambre 13 years ago.

Download all attachments as: .zip

Change History (4)

by arencambre, 13 years ago

Attachment: grass diagnosis.xlsx added

by arencambre, 13 years ago

Attachment: pointdata.dbf added

comment:1 by arencambre, 13 years ago

One note: an assumption is that imports from a PostGIS database should "just work".

comment:2 by martinl, 9 years ago

Milestone: 6.4.6
Note: See TracTickets for help on using tickets.