[GRASS-user] How to copy vector columns between databases

"Peter Löwe" peter.loewe at gmx.de
Thu Nov 27 06:42:33 EST 2008


Excellent. Thank you Markus!
Another proof how the community benefits when simple minds address stuff they can't figure out by themselves,

Simple minded,
Peter
-------- Original-Nachricht --------
> Datum: Thu, 27 Nov 2008 11:39:14 +0100
> Von: "Markus Neteler" <neteler at osgeo.org>
> An: peter.loewe at gmx.de
> CC: "GRASS user list" <grass-user at lists.osgeo.org>
> Betreff: Re: [GRASS-user] How to copy vector columns between databases

> (back from grass-dev)
> 
> On Thu, Nov 27, 2008 at 10:06 AM, Moritz Lennert
> <mlennert at club.worldonline.be> wrote:
> ...
> > And to respond to Peter's original query, i.e:
> >
> >> I have a vector layer FOO which is linked to two tables in layers 1 and
> 2.
> >> The categories for each vector element are different in layer 1 and
> (e.g.
> >> a certain area may have the cat value "51" in layer 1 and a cat value
> of
> >> "42" in layer 2).
> >> Let's assume that layer one has a VARCHAR column containing the names
> of
> >> the region (e.g. database_layer_1: 51,"Wolfenstein" database_layer_2:
> 42 )
> >>
> >> If a new VARCHAR column is added to layer 2 by v.db.adcol,
> >> how can the the names from layer 1 be copied into it?
> >
> >
> > it should actually be (assuming that the varchar attribute in layer 1 is
> > called 'name':
> >
> > v.db.addcol FOO layer=2 col='name varchar(Size)'
> > v.to.db myroads layer=2 option=query col=name qlayer=1 qcolumn=name
> 
> Now a FAQ:
> 
> 
> http://grass.osgeo.org/wiki/Vector_map_attribute_transfer_between_connected_tables
> 
> Markus

-- 
Dr. Peter Löwe
<peter.loewe at gmx.de>





Sensationsangebot nur bis 30.11: GMX FreeDSL - Telefonanschluss + DSL 
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a


More information about the grass-user mailing list