[GRASSLIST:3680] Re: v.in.ascii

Radim Blazek blazek at itc.it
Wed Jun 16 04:21:19 EDT 2004


On Wednesday 16 June 2004 09:00, Sabine Grabner wrote:
> GRASS 5.7.-cvs:~/diss/grassdata > echo "select bla bla" | db.select -c
> 34227.483487|5179925.971228|2070|4|31|0|Kurzras
> 63759.862367|5170751.156461|392|4|15|0|Meran
> 12698.088730|5195614.866289|1360|4|14|0|Nauders
>
> GRASS 5.7.-cvs:~/diss/grassdata > echo "select bla bla" | db.select -c |
> v.in.ascii -z out=temp200001311800 xcol=1 ycol=2 zcol=3 catcol=4 columns='x
> float, y float, z int, parameter int, data float, refper int, name
> varchar(20)'
>
> WARNING: Cannot create geometry table
>          ERROR: type "geometry" does not exist
> ERROR: Cannot open new vector temp200001311800 at sabine57

It writes data in PostGIS format, which was removed from 57
few weeks ago, so it does not have much sense to solve this 
error (most probably you use a database without PostGIS support).

Now, if you want to create PostGIS layer from data in GRASS, 
you have to run v.out.ogr, e.g.:
v.in.ascii out=temp200001311800
v.out.ogr input=temp200001311800 dsn='PG:dbname=mydb' layer=temp200001311800

BTW: catcol=4 is not correct, because values in column 4 are not unique,
     use catcol=0 to assign unique category to each record. 

Radim




More information about the grass-user mailing list