2

In QGIS I have a shapefile containing about 2000 features where I added a unique ID using the $id expression . I want to continue adding features to the same table, using the attribute feature pop-up after finishing the geometry creation.

My question is: is there an expression or function that auto-increment on the id numbers already in the id column? E.g. if you have id's from 1-2000, then QGIS automatically suggesting id number 2001 for the next feature added?

enter image description here

ArMoraer
5,7493 gold badges27 silver badges52 bronze badges
asked Apr 18, 2018 at 13:27

1 Answer 1

1

There is AutoFields plugin which does exactly what you have described.

After selecting the layer, choose your id field as the target Existing Field then give $id expression into the Custom Expression.


Having said that, I would recommend Update existing field in the Field Calculator.

enter image description here

It means you will update id field after adding features, but it would be easier.

answered Apr 18, 2018 at 18:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.