[GRASSLIST:10131] Re: adding attributes in txt file to vector
Martin Wegmann
wegmann at biozentrum.uni-wuerzburg.de
Thu Feb 2 10:56:15 EST 2006
On Tuesday 31 January 2006 18:35, Dylan Beaudette wrote:
> On Tuesday 31 January 2006 08:29 am, Martin Wegmann wrote:
> > hello,
> >
> > as far as I remember I asked this question before but forgot the answer
> > and did not find the right mails in the mailing list search.
> >
> > I have a vector with distinctive cats and a txt/csv file with
> > corresponding ones plus attribute data - how to I import and link the
> > txt-attribute file to the vector file?
> >
> > thanks in advance, Martin
>
> Hi Martin,
>
> what sort of attribute storage system are you using for your vector data?
> If you are using SQlite, or any other RDBMS like PGSQL or MySQL you can
> simply read the text file into a new table- then perform a join between the
> two tables (... where vector.cat = new_table.cat ...). Finally, use
> v.db.connect to connect the new table (with labels) to your original vector
> file. As for DBF data... that might be a little more complicated. Perhaps
> dumping the files to text, and using the UNIX command 'join' ??
I am still not very familiar with PGSQL even though I installed it and use it
as GRASS db. I will give the PGSQL - join - v.db.connect a try and will
report how it worked out.
thanks, Martin
More information about the grass-user
mailing list