[GRASS-user] String length error in v.in.ascii

I keep receiving a string length error message when attempting to import an
ascii file in a script I'm writing, and I can't figure out what the problem
with my input is.

Here's the input file I'm using:

607126.987 5182399.765 1 Marker 21/06/06 17:59:53
606833.724 5182768.462 2 Marker 21/06/06 18:00:09
606948.631 5183269.043 3 Marker 21/06/06 18:00:14
610006.053 5182358.383 4 Marker 21/06/06 18:00:19
609820.820 5185896.693 5 Marker 21/06/06 18:00:25
607654.773 5181988.599 6 Marker 21/06/06 18:00:31

Here's my v.in.ascii call:

v.in.ascii input=vect_temp_utm_formatted output=${OUTPUT} fs=" " columns='x
double precision, y double precision, cat int, ID varchar(12), Date
varchar(10), Time varchar(10)' x=1 y=2 cat=3 --o

And error:

Maximum input row length: 50
Maximum number of columns: 6
Minimum number of columns: 6
column: 1 type: double
column: 2 type: double
column: 3 type: integer
column: 4 type: string length: 6
column: 5 type: string length: 8
column: 6 type: string length: 8
ERROR: Length of column 4 (-1) is less than maximum value length (6)

Anyone have any ideas what I'm doing wrong here?

~ Eric.

Eric Patton wrote:

I keep receiving a string length error message when attempting to
import an ascii file in a script I'm writing, and I can't figure out
what the problem with my input is.

..

Here's my v.in.ascii call:

v.in.ascii input=vect_temp_utm_formatted output=${OUTPUT} fs=" "
columns='x double precision, y double precision, cat int, ID
varchar(12), Date varchar(10), Time varchar(10)' x=1 y=2 cat=3 --o

IIUC, "Date" is a reserved SQL type and can not be used as a column
name.

http://grass.ibiblio.org/grass61/manuals/html61_user/sql.html

If I change that to something else (but "_Date" is no good), your sample
data loads ok for me.

It doesn't make any difference but you can use fs=space if you like.

And error:

..

ERROR: Length of column 4 (-1) is less than maximum value length (6)

-1? strange. lib/db/dbmi_base/column.c

Hamish