[GRASSLIST:4637] Re: creating a table from ascii data?

Hamish hamish_nospam at yahoo.com
Mon Oct 25 19:28:04 EDT 2004


> > I am trying to convert a multi column text file[*] into a table
> > which I can then connect to a (5.7) vector map. I can't quite see
> > how to do this. Any ideas?
> > This is for a script, so "use OpenOffice & save as DBF" won't work.
> > 
> > [*] say .csv file; col1=cat col2=attr, etc.
> 
> How about the PostgreSQL copy command?

I have no idea.

I'd prefer (require actually) not to have PostgreSQL installed as a
prerequisite; I was hoping there would by a DBF (ie simple) solution.
 (+ I have no idea about Postgres)

All the functionality seems to be in v.in.ascii for importing in points
mode. This is for line attributes, so points mode doesn't really make
sense, but a bad hack might to be to assign dummy coordinate values to
get the table made via v.in.ascii and then link the columns I need from
that. A better solution might be to add a '-c' flag to v.in.ascii that
created a non-georeferenced table from stdin + columns='' + catcol= ??

I don't know the database stuff well so I am just guessing here.


Hamish




More information about the grass-user mailing list