Skip to main content

Questions tagged [unique-id]

Unique identifier is any identifier which is guaranteed to be unique among all identifiers used for those objects and for a specific purpose.

Filter by
Sorted by
Tagged with
3 votes
1 answer
61 views

Clipping buffers by Unique ID

I am doing my thesis on worldwide river discharge data availability. I need to know how to cut buffers with their corresponding vector/polygon that have an unique ID. I have stations worldwide with ...
Sebastian's user avatar
0 votes
0 answers
11 views

I am using BioOracle data and reducing it to 1 point per cell but when I try to covert to a sf grid, I end up having issues

I am using multiple BioOracle layers as geotiff files and reducing it to 1 point per cell, but when I try to convert to an SF grid, I end up having issues. I keep receiving an error stating: Error in ...
Micah Gisclair's user avatar
3 votes
1 answer
115 views

Fetching only ids of features with QgsFeatureRequest in PyQGIS

Using a QgsFeatureRequest by default will fetch all attributes (including geometry) of the features. I can use .setFlags(QgsFeatureRequest.NoGeometry) to not fetch the geometry, and ....
persephone's user avatar
1 vote
2 answers
121 views

Removing points outside of polygon but keeping points with the same feature ID using PyQGIS

I have a polygon layer and a point layer. The point layer has specific features in its table such as an ID called "fwg_type". There can be several points with the same "fw_type". I ...
janicans's user avatar
3 votes
1 answer
120 views

Calculating new id with suffix for another id field that has duplicates in QGIS

I have a linear dataset that has a unique "ID" for every row, but many of the linear features needed to be segmented. After segmenting, there are some rows that were split into two, three, ...
MidPiedmont's user avatar
0 votes
0 answers
42 views

QGIS Distance to nearest hub wrong point selection for distance calulation

I'm using the graphical modeler in QGIS 3.28.8 to automatically calculate distances of two lines between points, see the picture. To do this, I'm using Distance to nearest hub (line to hub) and an ...
abedl's user avatar
  • 1
5 votes
1 answer
1k views

Adding automatic numbering of the "id" field in QGIS

I'm working on QGIS 3.22.6 and I would like to find a way for my "id" column to be automatically numbered as geometry is added. I am currently using maximum("id") + 1 within the '...
joeliketoe's user avatar
3 votes
2 answers
161 views

Adding parcel number to site when there are many sites in QGIS

I have a PostgreSQL table with 7000 records relating to grounds maintenance. Each site has a site reference number and I want to assign a sequential parcel number within each site starting at 1 to n. ...
RBCMark's user avatar
  • 397
2 votes
1 answer
282 views

Get a group from layerTreeRoot using its unique id using PyQGIS

I am having trouble when loading some layers in QGIS. I want to place them in specific groups and sub-groups but a problem occurs when multiple groups and sub-groups have the same name. The only way I ...
Manos Papageorgiou's user avatar
1 vote
2 answers
66 views

Calculating field with consecutive number based on another field in QGIS

In QGIS I am working on a streets layer, on the attribute table I have these fields: "CVE_VIAL" is an ID of the street and each street could be divided into several sections, each of these ...
Carolina Tello's user avatar
6 votes
2 answers
285 views

Assigning IDs in regular point layer using QGIS

I have a uniform point layer generated by using the Regular Points process. My goal is to connect (draw a line to join) a certain number of points in this points layer in a snake pattern. My current ...
WFL.GIS's user avatar
  • 157
0 votes
1 answer
46 views

Retrieving fieldname of vectorlayer's unique id using PyQGIS

The name of vectorlayer's unique-id fieldname can be technically any string ("ID","FID","OID","id_0", etc) and its position can be technically anywhere. So ...
maxwhere's user avatar
  • 1,158
5 votes
2 answers
369 views

Generating unique positive integers as id with ogr2ogr

I create an example GeoJSON: import shapely.wkt import geopandas as gpd s0 = shapely.wkt.loads("POINT(0 0)") s1 = shapely.wkt.loads("POINT(1 1)") gdf = gpd.GeoDataFrame({'geometry'...
zabop's user avatar
  • 2,214
3 votes
1 answer
160 views

Numbering points that are contained in polygons in QGIS

In QGIS 3.16.8-Hannover I have a layer with polygons and I have a layer with points. Each polygon contains a certain number of points, I would like to assign a number to each point in sequential order ...
Ghostwriter84's user avatar
1 vote
1 answer
195 views

Calculating distance from point to line, depending on unique ID using QGIS

I have four points of interest for each plot, a line representing the segment that faces the road and the plots themselves for representation purposes (all of them share in common an unique "id&...
Marin Marian's user avatar
0 votes
1 answer
107 views

Integer representation of textual value (as unique ID for query layer)

I have an Oracle 18c non-spatial table that has textual IDs as the unique ID: The table doesn't have a ObjectID or numeric ID. I'm not able to add new columns to the table. The table isn't registered ...
User1974's user avatar
  • 1,132
4 votes
2 answers
1k views

Unique id forever QGIS

I need to create a unique id when adding an object to a shapefile (point, line, polygon). I read a lot of things about that, but stay sceptic when using it. I presume static field can not be envisaged ...
ClaudeVer's user avatar
  • 630
3 votes
2 answers
764 views

Adding unique ID for consecutive groups using Field calculator in QGIS

I found a similar question on this site and the answer suggested: array_find( array_distinct( array_agg("PortCluster_ID") ), "PortCluster_ID" ) + 1 ...
Peter Mastnak's user avatar
3 votes
1 answer
584 views

QGIS graphical modeler and FID

I created a model to import different shape files coming from ARCMAP, to load them into my geopackage of my project. The model does different things: Delete attribute (OBJECTID, SHAPE_LENGTH and ...
katagena's user avatar
  • 1,668
4 votes
1 answer
264 views

Generating list of IDs from intersecting lines

I have a line ('line 1' for example) that sits on top of another set of lines in a separate layer ('line 2' we shall name it). 'Line 2' has within it a field for IDs. What I need is to populate a ...
snakey866's user avatar
  • 101
2 votes
1 answer
2k views

Appending field from one layer into a different layer in QGIS

In QGIS, I have one layer (called 'All data shapefile') which is a shapefile with my entire set of data, and another layer (called 'Y_data') that is also a shape file with a subset of 'All data ...
Burton Guster's user avatar
1 vote
1 answer
252 views

How to attribute each datapoint to a specific buffer ID

I have many datapoints within 57 buffers in GIS (see picture for an example of a couple of the. buffers with datapoint inside). I need to be able to analyze each buffer separately, and therefore need ...
Burton Guster's user avatar
3 votes
1 answer
357 views

Creating unique ID for features that are within polygons with unique IDs

I need to create and "ID" for items within a polygon that also takes into account the name of the polygon that the item is within, so what I need is something along the lines of: poly_X_Item ...
snakey866's user avatar
  • 101
5 votes
3 answers
1k views

Giving grid cells unique ID of numbers and letters by rows and columns

In QGIS 3.16 I have a grid made up of c.900 squares and I want to give each square in the grid an individual name. I want rows to be numbers and columns to have letters so when they meet that is our ...
Shane Mallon's user avatar
5 votes
1 answer
153 views

Unique attribute value across multiple layers

We are in the process of cleaning up our asset database which contains day 20 of layers generally in file geodatabase format and includes point, line and polygon types and some non spatial tables. Is ...
boberdorf's user avatar
  • 1,357
10 votes
1 answer
14k views

Unique constraint failed error when saving GeoPackage in QGIS

In QGIS, when using Processing tools, the temporary output layer in many cases cannot be saved as Geopackage. This happens for example when using "Explode lines" or "Multipart to Single ...
Babel's user avatar
  • 72.1k
0 votes
0 answers
183 views

Count duplicates in a field for sequential unique ID

I am trying to create a unique ID for my street feature class. (My unique ID starts with first 3 letters of the Street Name, 2 letters of the Street type, and 3 letters of the City Name Abbreviated.) ...
Gabriella Santana's user avatar
5 votes
1 answer
117 views

Creating IDs for middle point of line

I have line layer as shown here: I created middle point of line by using the below query in virtual layer. SELECT ST_StartPoint(ST_Line_Substring(geometry, 0.5, 1)) FROM "TR_ROAD copy" The ...
Case Msee's user avatar
  • 855
6 votes
1 answer
593 views

Creating Unique IDs of points in order from west to east

I have a dataset with over 1000s points. I am wondering if I am able to give each point a unique ID starting from west to east. I am using ArcMap 10.6. Is there a way to do this in ArcMap?
user avatar
0 votes
0 answers
121 views

Linking Excel spreadsheet property records to cadastral basemap in QGIS using ERF numbers as the unique identifier

How does one link land parcel polygons in QGIS to an Excel spreadsheet of property records, using ERF numbers as the unique identifiers?
Jacques Strauss's user avatar
2 votes
3 answers
412 views

Expression for assigning ID by grouping and ordering polygons in QGIS

To solve a problem (details see here) I am looking for an expression in QGIS (3.16) that creates a new field and should achieve this: On a polygon layer, it should group together all polygons that ...
Babel's user avatar
  • 72.1k
0 votes
0 answers
52 views

Autopopulating field based on values from different field

When we ID our utilities (water pipes, storm manholes, etc.) we use ID's derived from a grid system. Our city is divided into grids that have a letter and number attached. "J14", "J15&...
Dillon Rhodus's user avatar
8 votes
4 answers
2k views

Adding unique ID for groups of items using Field calculator in QGIS

I have a set of string values in a shapefile's attribute column and want to assign a number to them in a way that each unique string gets an integer number, like this: How do I do this using the ...
Elise's user avatar
  • 125
2 votes
0 answers
95 views

Filling column with values at certain condition in QGIS

I have blocks of the road network and these blocks are divided every 200m. I want to name them based on the ID_Sufix number. For example, if the stretch road ID is 10001 and this contains 26 small ...
MapQuest's user avatar
  • 405
1 vote
0 answers
543 views

Generating UUID(unique ID) at joining points

I have road network (lines) and points (Address) . With the help of closestSegmentWithContext function, I join points to nearest lines in QGIS. Is there a way to to generate a unique ID at every ...
Case Msee's user avatar
  • 855
8 votes
3 answers
2k views

Adding consecutive unique ID starting from 1 for each distinct set of values

I need to add a unique ID (using $ID or @row_number) but the problem is that I need to start from 1 to "...n" considering identical values from other field, then, when there is a different ...
Geografisica's user avatar
5 votes
2 answers
6k views

Adding unique ID automatically in Field calculator as counter in QGIS 3

I tried a lot by Field Calculator but it gives me NULL as you show in table and another try it gives me value 1 in all rows. Most of examples, on internet they are explaining old version and I have ...
potter90's user avatar
  • 111
7 votes
1 answer
3k views

Creating GRID with customized labels in QGIS

I would like to know how can I create a GRID layer with customized labels as you can see in the image below: I have searched this topic here: Creating indexed vector grid in QGIS? QGIS Python ...
Paulo Martinho's user avatar
2 votes
0 answers
199 views

Snap GPS coordinates to closest line, get line ID, generate and execute URL

I have a web map in Portal that has a sidewalk line layer. Using Portal, I plan to collect sidewalk deficiencies using GPS (on a Microsoft Surface/Windows 10 device). I would like to add the ...
User1974's user avatar
  • 1,132
1 vote
0 answers
70 views

Unexpected query layer results: Why does unioning with DUAL fix it?

Simple Query: I have a query that connects to a table in a work order management database (Oracle 12c; non-GDB). select wo.wonum from maximo.workorder wo The query returns 428 records in ...
User1974's user avatar
  • 1,132
1 vote
1 answer
42 views

Splitting lines: Options for managing IDs and related records

I have roads in a feature class (Oracle 10.3 geodatabase). Roads are split into separate lines where they intersect. This is an established business rule that cannot be changed. Each road has ...
User1974's user avatar
  • 1,132
4 votes
1 answer
7k views

Joining attributes by field value not working

I cannot figure out why this join is failing when using the Join attribute be field value tool in QGIS 3.6. Please see my image below which highlights the two layers attribute table and the criteria ...
AWGIS's user avatar
  • 3,230
3 votes
1 answer
477 views

How to export a unique ID field of a geopackage

When I am converting my geopackage file in shapefile, the unique ID field is not exported. I could duplicate it before exportation, but I wanted to know if it could be done in one step, in order not ...
Philippe Malcorps's user avatar
0 votes
1 answer
70 views

New ID in QGIS not duplicated [closed]

I work mainly with ArcGIS in backoffice, but use QGIS for some field data maintenance, the challenge is that: The info worked in office has about 4.5M records, but for maintenance purposes, we create ...
FTeixeira's user avatar
7 votes
4 answers
4k views

Fill with @row_number based on group field in QGIS 3

Is there a way to fill the table with a row number so that count will restart as new group (identified by a separate column) starts? As a result, "row number" column will restart the count ...
Ruslan's user avatar
  • 695
1 vote
0 answers
138 views

Make Query Layer - field not available as unique identifier when using NVL [duplicate]

I need to create a spatial view with Make Query Layer. My query includes outer joins, so I must combine every table's ID field to create a unique identifier. Since there might not always be a child ...
GISGe's user avatar
  • 9,684
0 votes
1 answer
138 views

Field Calculator: Prefixed, padded IDs from a number field

Using the Field Calculator, I want to create prefixed, padded IDs from an existing number field. By "padded", I mean I want the IDs to have a specific number of characters, regardless of how many ...
User1974's user avatar
  • 1,132
0 votes
3 answers
2k views

Sequential IDs with field calculator: Pad a prefixed field to specific length

I have an ID field that is a text datatype. The IDs in the field have a prefix, and are padded with zeros to always be a specific length. Examples: INSP000098 INSP000099 INSP000100 INSP000101 I ...
User1974's user avatar
  • 1,132
1 vote
1 answer
711 views

Find records with highest value based on unique ID

I'm trying to find a way to return all records that have the highest value in a field for each set of unique IDs. The attached table shows what I'm trying to achieve. The highlighted records would be ...
Mercator's user avatar
  • 283
2 votes
1 answer
435 views

non-editable date / UUID is not saved in attribute table

I'm using QGis 2.14.12 Essen on Windows 7 Professional. I want to set up a project that includes a feature class which has a non-editable° creation_date field and a non-editable UUID field. I have ...
Iris.D's user avatar
  • 21