[GRASS-user] How to link or combine adjacent vector lines
mlennert at club.worldonline.be
Mon Feb 13 04:50:23 EST 2012
On 12/02/12 22:20, Stefan Luedtke wrote:
> That did the trick, almost.
> They join each other -so v.build polylines ... worked, but, the table is
> exactly the same as it was before. The command output said, that the
> number of lines was reduced to almost 50%. Furthermore, if I check the
> cat number next to the lines (via d.vect) it looks fine for both
> methods, first and multi. But the table does not show any diffs and
> holds the same number of entries like the original one. I could not find
> anything about that in the manual.
With options first and multi v.build.polylines just copies the attribute
tables as is, i.e. it does not delete any lines for which there are no
more category values in the vector file.
To create an attribute table that corresponds to the current vector amp
with the following steps (supposing that the vector map is called
db.copy from_table=river_poly to_table=river_bak # create backup of
v.db.connect -d river_poly # erase line between vector map and table
db.droptable river_poly # erase table river_poly
v.db.addtable river_poly # create new table for vector map river_poly
If you do all this using an SQL backend (e.g. SQLite or PostgreSQL), you
can then use v.db.join to join any attributes from the original table
river_bak to the new table river_poly.
More information about the grass-user