<div dir="ltr">Hi,<div><br></div><div>I have a vector line map (river network) which I want to clean and break the lines at intersections. Therefore, I use the tool v.clean with the option break. This of course increases the number of vector lines as several lines got broken into two or more separate lines. Now there is a attribute table linked to the original map. I want to update this attribute table by inserting a new column that contains a new unique ID (cat) for each line but still keeps the old cat in another column (E.g. old_cat). Thus the attribute table should also increase in number of rows (=number of lines).</div><div><br></div><div>Now, most likely the tool to use now is v.category to get a column of new unique categories (in another table/layer?) and the use probably a join statement to get back the information from the original table (with doubled entries for those lines that got broken during v.clean). </div><div><br></div><div>What I tried so far:</div><div><br></div><div>#########################</div><div># Cleaning vector and breaking lines</div><div><div>v.clean -c --overwrite input=river_network_modified output=river_network_modified_clean tool=break,snap,rmline threshold=0,50,0<br></div><div><br></div><div># Check cats</div><div>v.category input=river_network_modified_clean option=report layer=-1</div><div># type       count        min        max</div><div># line       16592          1      16448</div><div><br></div><div># Update cats</div><div>v.category -t --overwrite input=river_network_modified_clean type=line output=river_network_modified_clean2 option=del</div><div>v.category -t --overwrite input=river_network_modified_clean2 type=line output=river_network_modified_clean3 option=add</div><div><br></div><div># Check cats</div><div>v.category input=river_network_modified_clean2 option=report layer=-1</div><div><div># Layer: 1</div><div><div></div></div></div><div><div><div># type       count        min        max</div></div><div># line       16591          2      16448<br></div></div><div><br></div><div><div># Check cats</div></div><div>v.category input=river_network_modified_clean3 option=report layer=-1</div></div><div># Layer: 1</div><div><div><div># type       count        min        max</div></div><div># line       16592          1      16448<br></div></div><div>########################</div><div><br></div><div>However, I expected the max values of the latest (updated) vector to be 16592 to have really unique values for all 16592 lines (from 1 to 16592)? But the output shows the same information as the initial input map? Probably I am still mixing up things with categories/layers... and maybe someone has a quick hint how to get an updated attribute table for a map that has been processed using v.clean and where lines were broken.</div><div><br></div><div>/johannes</div><div><br></div><div><br></div><div><br></div></div>