9

Does somebody know how to automatically number the points during digitization in Qgis. To explain, when I create the new point there is the window where I must to type the point number. Is there any way to automatic number without manually typing of point number?

  • 1
    Do you mean ID number? – ahmadhanb May 26 '16 at 8:38
  • 5
    QGIS has option to not open that window - Settings / Options - Digitizing tab - Feature creation - Suppress attribute form pop-up. After digitization is finished, you can use $rownum or $id to fill all at once. Will that do? – Miro May 26 '16 at 8:42
  • @Miro: this is probably the best solution (the way I usually do that actually). No need that the ID is generated at the same time features are created. – wiltomap May 27 '16 at 7:08
  • Yes, this is the best solution if I want all number to be between 1 and N, but I want some numbers to be from 1 to N and many of them to be some other sign, for example 1-16-4A. Because that I can`t use this method. – Slobodan May 27 '16 at 12:00
7

One method is to use a virtual field which would automatically number your points using the $id expression (or whatever expression you prefer):

Field Calculator


Note that you will need to save a project file for this as virtual fields are saved in the .qgs file and not in the shapefile itself (but you can re-save the shapefile as a new one using the Save As... option which would convert the virtual field into a normal one).

4

I think you talk about the id of shapefiles, if so you can go to layer properties (doubleclick the layer) then go to fields and set the item that is called 'Bearbeitungselement' in german to UUID-Generator (id field type must be text) as shown in the screenshot below (https://en.wikipedia.org/wiki/Universally_unique_identifier).

enter image description here

When digitizing your points (or other geoemtries as well, of course) you get this:

enter image description here

and you will just have to enter the other attribute values if applicable.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.