[GRASS-dev] [GRASS GIS] #1445: v.in.ogr cannot insert apparently valid text into DBF row

#1445: v.in.ogr cannot insert apparently valid text into DBF row
------------------------+---------------------------------------------------
Reporter: arencambre | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Vector | Version: 6.4.1
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
------------------------+---------------------------------------------------
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.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1445&gt;
GRASS GIS <http://grass.osgeo.org>

#1445: v.in.ogr cannot insert apparently valid text into DBF row
------------------------+---------------------------------------------------
Reporter: arencambre | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Vector | Version: 6.4.1
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
------------------------+---------------------------------------------------

Comment(by arencambre):

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1445#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>