[GRASS-user] Giving unique cat values to lines using v.category
Christian Kaiser
Christian.Kaiser at unil.ch
Tue Dec 22 12:04:22 EST 2009
Hi,
I have some troubles with understanding v.category.
I have a map with the road network. After using v.clean, I have lines with the same cat. Now I want to give each line a unique cat going from 1 to N, and then add 4 columns with the coordinates of the start and end coordinates of each line.
So I did use:
v.category input=roads output=roads_nocat option=del
for removing the categories.
I did also remove all database entries using
echo "DELETE FROM roads_nocat" | db.execute
which deletes all rows but leaves the table in the database (using the default DBF database)
and then I did add the categories again using:
v.category input=roads_nocat output=roads_cat option=add
There are still some lines sharing the same cat...
As a consequence, if I call then:
v.db.addcol map=roads_cat columns='startx DOUBLE PRECISION, starty DOUBLE PRECISION'
v.to.db map=roads_cat option=start columns=startx,starty
I get logically a warning for the lines sharing the same cat
Is this normal behaviour? What did I wrong? Sorry if I am missing something obvious.
Christian
More information about the grass-user
mailing list