[GRASSLIST:8972] Re: Some issue with v.in.ascii and GRASS manual

Markus Neteler neteler at itc.it
Thu Nov 10 06:52:50 EST 2005


On Wed, Nov 09, 2005 at 04:39:21PM +0100, Luca Casagrande wrote:
> Hi to all guys!
> For my italian gis wiki ( http://www.freegis-wiki.it ) i am adding to the FAQ 
> section the question that i found on the international ML (the italian one is 
> not so populated ). I notice that a lot are having issue with importing txt 
> file as vector one, so i decided to do some resarch in this direction.
> I toke this example from  v.in.ascii manual:
> 
> GRASS 6.0.1 (spearfish60):~ > cat points3d.dat
> 593493.1|4914730.2|123.1|studna|well
> 591950.2|4923000.5|222.3|kadibudka|closet
> 589860.5|4922000.0|232.3|hruska|pear
> 590400.5|4922820.8|143.2|mysi dira|mouse hole
> 593549.3|4925500.7|442.6|mineralni pramen|mineral spring
> 600375.7|4925235.6|342.2|kozi stezka|goat path
> 
> and then run:
> 
> cat points3d.dat | v.in.ascii -z z=3 cat=0 out=mypoints3D \
>                    columns='x double, y double, z double, label_cz 
> varchar(20), label_en varchar(20)'
> 
> But got this output:
> Maximum input row length: 25
> Maximum number of columns: 3
> Minimum number of columns: 0
> ERROR: x column number > minimum last column number
> 
> What am i missing?

Luca,

are you using the sqlite driver (db.connect -p)?

I tried, it fails for me with sqlite, apparently
db_set_column_length() returns -1 for string columns/sqlite.

With e.g. DBF driver it works. We'll have to fix this.

Markus




More information about the grass-user mailing list