[GRASS-user] v.in.ascii create a dbtable

Hamish hamish_nospam at yahoo.com
Thu Apr 5 09:02:28 EDT 2007


Martin Landa wrote:
> > I noticed this "strange" behaviour last week. Table is created only
> > if you declare at least one addition column in the table, e.g.
> > col="cat int, x double, y double, z double, data int".

Roger Bivand wrote:
> Is v.in.ascii creating a 3D point, even if -z is not set?
>
> echo "1|1|1" | v.in.ascii out=test z=3
> v.info test
> 
> has no dblink and is 3D;
> 
> echo "1|1|1" | v.in.ascii out=test1 col="x double, y double, z double"
> v.info test1
> 
> has a dblink and is not 3D.


Yes, two things are happening here. You've each described one.

1) Table is only created if it is needed. (if all data can be stored in
the vector map itself, it is) Use v.db.addtable + v.to.db to manually
populate a table if you wish. Or another way: don't be wasteful with
disk space.

2) using z= means you will have 3D data, so it now triggers -z if it
wasn't given. Or another way: z= without -z is bogus.


IMO both are correct behaviour, but I doubt everyone will agree.


Hamish




More information about the grass-user mailing list