(Relatively new Qqis user)

I have a vector layer (lines) for a road network - which has a field for each road name and a field for road segments - but I need to add fields for numeric IDs rather than string; so I'd like to be able to assign a numeric road ID to the group of records for each road name and I'd like to assign a sequential ID to each segment for each road ID.

Example: I have 5 segments for "Main st", I'd like to assign a numeric id of 1 to Main street and each segment to have an incremental id as well so they can be identified as 1-1, 1-2, 1-3, 1-4, 1-5 and so on...

  • I found a way to assign sequential values with 'add unique value index field' algorithm in the graphical modeler - but I also want to add a sequential number in another field that restarts for each unique value. I've tried it with the 'Add autoincremental field' algorithm, but I can't get it to restart for each unique id, just an incremental number for each record. – CEL-ma Nov 29 '17 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.