[GRASSLIST:3678] v.in.ascii

hello,

i work with grass57

i read data from a postgis-database and want to write the attributes to
another postgis-database.

it worked well till yesterday when i did something to my shell scipt what i
don't understand.

few weeks ago i did the settings with db.connect (where i want to read the
data from) and v.database (where i want to write the attributes).

yesterday i coppied thoos commands to my shell script cause i thought this is
more understandable for later times / other users. so any time one runs the
skript, thoose settings were done. but now it doesn't work any more.

the query from the first database (db.connect) is ok, but the writing with
v.in.ascii (v.database) does not work any more:

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
52576.650269|5192186.387956|1938|4|6|0|Obergurgl
41250.179496|5198433.803317|2850|4|-55|0|Pitztaler Gletscher
41583.167745|5198736.249552|2850|4|-52|0|Pitztaler Gletscher
44197.235370|5191251.584895|1906|4|37|0|Vent

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@sabine57
GRASS 5.7.-cvs:~/diss/grassdata >

does anyone have an idea?

thank you, sabine

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@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