[GRASS-dev] Re: [grass-code I][412] v.in.ascii: fails if data in last column is all empty

Hi,

it is strange but I cannot attach patch using GForge. I add the file
to 'Attach Files', click to 'Submit'. Then I can see 'Updated
successfully' but in the result 'No Files Currently Attached'. Maybe I
am doing something wrong, in the past I remember that it worked. So
there is the patch...

Martin

2007/5/30, grass-codei@wald.intevation.org <grass-codei@wald.intevation.org>:

code I item #412, was opened at 2007-05-30 12:34
Status: Open
Priority: 3
Submitted By: Hamish Bowman (hamish)
Assigned to: Martin Landa (martinl)
Summary: v.in.ascii: fails if data in last column is all empty
Issue type: module bug
Issue status: None
GRASS version: CVS HEAD
GRASS component: vector
Operating system: all
Operating system version:
GRASS CVS checkout date, if applies (YYMMDD): 070529

Initial Comment:
v.in.ascii fails if data in last column is all empty:

v.in.ascii out=test_via \
  column='x double, y double, name varchar(3), other int' << EOF
11|21|abc|
12|22|def|
13|23|ghi|
14|24|jkl|
15|25|mno|
EOF

Scanning input for column types ...
Maximum input row length: 11
Maximum number of columns: 3
Minimum number of columns: 3
column: 1 type: integer
column: 2 type: integer
column: 3 type: string length: 3
WARNING: Table 'test_via' linked to vector did not exist.
ERROR: Number of columns defined (4) does not match number of columns (3)
       in input.

3x dirsep = 4 columns.

Currently need a kludge in v.in.gpsbabel and v.in.garmin to work around this.

Exists in GRASS 6.0.2 - latest 6.3 CVS.

Hamish

----------------------------------------------------------------------

>Comment By: Martin Landa (martinl)
Date: 2007-05-30 15:23

Message:
missing patch...

----------------------------------------------------------------------

Comment By: Martin Landa (martinl)
Date: 2007-05-30 15:21

Message:
This patch should fix the problem. Please test it.

----------------------------------------------------------------------

You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=204&aid=412&group_id=21

--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *

(attachments)

token.c.diff (2.16 KB)