• Skip to primary navigation
  • Skip to main content

North River Geographic Systems Inc

Spatial Problem Solving

  • Home
  • About NRGS
  • Blog
  • Resources
    • Guides for using TN Data with QGIS
    • QGIS Resources
    • Tutorials
  • Services
    • Support Services
    • Tennessee NG911 Address Server
    • Training
    • Forestry Database Services
    • Conservation GIS
    • Data Analysis
  • Portfolio
  • Show Search
Hide Search
You are here: Home / QGIS: Unique identifer for a layer

QGIS: Unique identifer for a layer

  • Software: QGIS 3.x
  • Operating System: Windows, Linux, Mac

Sometimes you need to uniquely identify data. I have one client for which I generate points and those points must be unique.

1. Open your data in QGIS – in this example I have points that have been generated and fall within a boundary.

qgisuniquepoints

 

2. Open the attribute table and toggle editing mode on the point file.

toggle

3. In this case I’m not only going to have a unique number – but I’m going to add some letters to it. As an example M1. Open the field calculator.

4. There are two ways I have done this – one is using the Function $id and one is using the function $rownum. Both of these functions can be located under Record in the function list.

  • Create a new field called name
  • output field type string
  • Default to 10 characters
  • Under expression enter ‘M’ || $rownum

FieldCalc

5. Click OK. You now have a unique attribute for your point file.

uniqueattr

 

Contact

  • (423) 653-3611
  • info@northrivergeographic.com

Copyright © 2021 · Monochrome Pro on Genesis Framework · WordPress · Log in

  • Home
  • About NRGS
  • Blog
  • Resources
  • Services
  • Portfolio