[GRASS-user] merging 2 line segments in a vector

Maciek Sieczka werchowyna at epf.pl
Sun Jun 11 13:10:36 EDT 2006


On Thu,  8 Jun 2006 19:36:04 +0200
Michael Fecht <Michael.Fecht at uibk.ac.at> wrote:

> Hello Stephan,
> > > > > i digitized a line layer in grass6.1cvs(from last week). Now I
> > > > > want to merge 3 linesegments in the layer to be one segment.
> > > > > Is there a methode/tool to do this topological task (I could
> > > > > not find any in v.clean)?
> > > >
> > > >
> > > > try v.build.polylines
> > > >
> > > Thanks, the geometry/topology was modified as expected. But there
> > > is a problem with the attributes.
> > >
> > > The input map has a table with attributes but v.build.polylines
> > > does not write a table for the output map as described in the
> > > manual. Any ideas?
> >
> > AFAIK the table does not get altered, because the program does not
> > know which attribute will be assigned to the new vector.
> It should be possible!
> 
> Extracted from the manual:
> If the lines that make up a polyline have different attribute values
> then v.build.polylines will set the attribute value of the polyline
> to that of the last line  (this is the behaviour of v.build, which is
> used to assign the attribute values).

I'm not sure if the manual reflects the current v.build.polylines
state. It looks like a copy/paste from the old Grass 5 manual.

I suppose this paragraph might reffer to category numbers (a vector
feature), not to attributes stored in table.

Try hhis:

Copy the original table (db.copy) and connect the copied one with
v.build.polylines output (v.db.connect).

Now you can also get rid of redundant datatable rows by v.extract with
only input and output specified (which will output your vector copy with
a table containing only rows which have a corresponding vector feature).

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/




More information about the grass-user mailing list