[GRASS-user] Problems with v.to.db after breaking with v.edit
kattwinkel-mira at uni-landau.de
Fri Aug 12 00:24:41 PDT 2016
Thanks for the advice.
The first step suggested does produce a new vector map with the old
information in layer 1 and new categories in layer 2 (nothing else).
However, I do not understand the 2nd step. Do you really mean to connect
table2 (I guess that is the one belonging to map2) to map2? It is
already connected. Connecting it to map_of_vedit also does not work
(i.e. nothing happens):
0 categories read from vector map (layer 2)
7759 records selected from table (layer 2)
0 records updated/inserted (layer 2)
Current attribute table links:
Maybe I should give a bit more information:
I have a stream network with a few junctions with more than two inflows.
For the things I want to do afterwards, only two inflows are allowed.
Therefore, I cut the outflow segment close to the junction and reconnect
one of the inflows to the cut point to create a new junction with only
tow inflows (the moved one and the short bit of the old outflow). Now I
need to correct the relations of the streams (originally output of
r.stream.order with columns stream, next, prev_str01, prev_str02,...).
To this end, I want to change the stream id of the new shorter bit. To
do this I have to calculate the lengths of the pieces, which seems not
to work properly because the two pieces of the cut segment have the same
Has anybody another idea?
On 12/08/16 05:38, Daniel Torres wrote:
> Does this helps you?
> v.category input=map_of_vedit output=map2 option=add layer=2
> v.db.addtable map=map2 layer=2 table=table2
> In that way you preserve original information in layer1, and new
> categories in layer2
> Hopefully that will be useful. Maybe someone has a better idea.
> >Dear list
> >I break a number of features in a vector map into two pieces using
> >v.edit, tool=break and specific coordinates. This results in two parts
> >with identical attributes after breaking (which is what I want) but also
> >the cat is identical.
> >I think, this is the reason why I get exactly the same length for the
> >two parts when calculating it using v.to.db, tool=length. Likewise, the
> >end coordinates cannot be computed as there is more than one element for
> >some categories.
> >How can I update the category to unique values for each feature?
> >Thanks for any suggestions,
Dr. Mira Kattwinkel
Quantitative Landscape Ecology
Institute for Environmental Sciences
University of Koblenz-Landau
Phone: + 49 6341 280-31553
Office: Building I, Room 2.02
More information about the grass-user