Questions tagged [select-by-expression]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
41 views

QGIS select by expression Modeler

I'm trying to build a model which should select polygons based on selected polylines. The polygons share attribute values with the polylines. In this case the field "Outlet" (polygon) ...
user237984's user avatar
2 votes
1 answer
86 views

QGIS: Select by expression on the same layer with condition

What I am trying to achieve is selecting the lines that have the value of the field "Heizlast in kW" = 0 + the lines that touch it (like the selection in the picture above). Using the ...
Denis Crîlov's user avatar
2 votes
0 answers
51 views

Selecting features based on minimum overlap with another layer in QGIS [closed]

I have a "sites" vector layer with 300 polygon features and a "heathland" vector polygon layer, showing the locations of heathland areas. I am looking for a way to select all ...
nn90's user avatar
  • 57
2 votes
2 answers
69 views

How to only select contiguous parcels that have the same ownership AND exclude those owners that have parcels that are non-contiguous (QGIS)

I have a shapefile containing parcel data for multiple counties, and I'm trying to narrow this dataset with the following conditions: 1.) Identify owners with contiguous parcels AND 2.) Exclude owners ...
garfieldapologist's user avatar
2 votes
1 answer
94 views

Selecting duplicate IDs in QGIS

I have a .csv file in QGIS with a list of water meters and their associated property IDs. Some property IDs have >1 water meter. I want to run a selection query to find all the duplicate property ...
Mow's user avatar
  • 175
1 vote
1 answer
84 views

QGIS Model Designer - Select by expression doesn't work

I try to do a simple model with the Model Designer of QGIS and I have an issue with the algorithms Select by expression. And when I want to check the validity of the model the explanation is just : ...
Sof's user avatar
  • 13
5 votes
1 answer
118 views

Selecting top two features with longest length in the line vector file in QGIS

I have a line vector file and I need to select two lines with the longest length using expression. I am familiar with selecting the line with the longest length: length($geometry) = maximum(length($...
unknown123's user avatar
3 votes
1 answer
169 views

Save vector layer features into separate layers, based on combination of two attribute values: correct QGIS expression

I am doing a lab worksheet and I am having a hard time figuring out what to put in in the expression box. GENERAL STEP: You need to identify Aspen and Birch (Select by Expression) and export these ...
Jamie's user avatar
  • 61
5 votes
2 answers
180 views

Selecting Features by Expression in QGIS

I have a set of features in a single layer that have been created during various periods of time. In a layer attribute table, there is a column kreirao_datum which means created on a date I would ...
Igor A.'s user avatar
  • 53
0 votes
0 answers
35 views

How to select by expression multiple rows in attribute table [duplicate]

I have a large number of parcels to select, which id number are in Field Name "numberofparcel". How can I make an expression with group of parcels to select by their id number? I use QGIS 2....
Stevan Stojiljkovic's user avatar
2 votes
0 answers
84 views

Expression writing in QGIS/Select by expression

I'm trying to write formulas/expressions for selecting purposes. I want to create a fixed table in a report layout, and for let's say one particular cell, I'd like to retrieve data from a SELECTED ...
Marius C.'s user avatar
2 votes
1 answer
44 views

Selecting everything of one cell value using PyQGIS

I'm trying to make a selection using PyQGIS. The short snippet I'm working with is hej = iface.addVectorLayer('rs_map_Ale.shp', "", "ogr") hej.selectByExpression("KOMMUNNAMN=...
Tobias Bowley's user avatar
1 vote
1 answer
261 views

How to select multiple values (features) in separate columns (QGIS) [closed]

Two parts to this question. Part 1 I'm trying to select by expression all rows (features) that have a particular value across multiple columns. So, for example, I want to select all features that have ...
greyhug's user avatar
  • 77
0 votes
1 answer
134 views

Select points within a polygon based on attribute value within polygon and point attribute values

I have a two datasets - a polygon dataset of buffers around a point and a point dataset. The polygon dataset has an elevation value (assigned from the point on which the buffer was created) and each ...
DanaAllen's user avatar
2 votes
1 answer
290 views

Selecting layer by expression with two variables using PyQGIS

I would like to filter a column coming from a layer with the command layer.selectByExpression(). I would like to leave the name of the column as a variable (not fixed). I made a conditions inside the ...
Paulo Matias Montecinos Medel's user avatar
0 votes
1 answer
294 views

QGIS: select multiples attributes which contains different words using select by expression

I would like to select multiple attributes which contains some specific text ("Bus", "Car", and "Motorbike") from the same field ("commodity") using Select by ...
OgeiD's user avatar
  • 534
3 votes
2 answers
354 views

QGIS: Select feature using SQL with highest value for attribute, grouped by another attribute

I have a relatively small attribute table that includes a column where data (parameter 1) is identical across several rows. I would like to select only the row with the highest parameter 2 based on ...
Tengger's user avatar
  • 39
1 vote
1 answer
538 views

How do I select features with the same values but different IDs from a layer's attribute table in QGIS?

I have a multipolygon layer with several regions (green circles) that are identified through numerical fids. Within each region are multiple points (orange dots) with individual pointIDs. See example ...
user avatar
3 votes
1 answer
437 views

Delete any polygon that overlaps polygons on another layer in QGIS

I'm new to GIS software and I couldn't find an answer here for QGIS specifically. I have layer A with a few thousand polygons that have the attribute "Field". I have layer B which is a ...
Meep the Changeling's user avatar
1 vote
1 answer
292 views

QGIS Print Layout expression for selected features in project

I have a selected feature in the project that is symbolised differently. I can see it in the print layout, but the is_selected expression returns a false. I need to label only this feature in a text ...
Philip Viljoen's user avatar
2 votes
1 answer
1k views

QGIS Expression with multiple IS NOT filters

I would like to select features using an expression. I have one field with +-100 different values. I would like to select all values except for two. Something like this: "FIELD" is NOT ( '...
Nindooo's user avatar
  • 55
4 votes
2 answers
663 views

Selecting values of variable in attribute table which contains specific character in QGIS

I have a shapefile of a grid cell. I would like to select all the observations (cells) whose values in column "mean" is not an entire number. I was thinking to do it selecting all the ...
OgeiD's user avatar
  • 534
5 votes
2 answers
495 views

Displaying only visible in canvas features in attribute table using PyQGIS

As explained by @xunilk in Getting attribute values from vector features visible in QGIS canvas using PyQGIS we can easily access to the attribute values of the features visible in the QGIS canvas (...
wanderzen's user avatar
  • 2,100
4 votes
1 answer
350 views

Selecting first row for group using select by expression

How would/could I use the select by expression tool to select only the first row for each origin_id group? The rows with a yellow border are the ones I want selected.
MJM's user avatar
  • 975
6 votes
3 answers
2k views

QGIS Select points within ONE polygon in a different layer

I have a set of points, which are located in the same area where the other, polygon layer is located. I would like to have all the points selected, but ONLY within the one polygon belonging to the ...
Geographos's user avatar
  • 4,077
5 votes
3 answers
1k views

Selecting features containing specific text string using an expression in PyQGIS

I'm trying to select features with a specific text that I have in an attribute. I used the expressions from the PyQGIS Cookbook but I'm having trouble with the selection because the functions I'm ...
caro's user avatar
  • 53
6 votes
1 answer
675 views

Selecting features that do not touch other features in same layer in QGIS

In QGIS I have a polygon layer where there are some isolated objects which do not touch other objects in the same layer. They are isolated and therefore I do not need them. How can I select these ones?...
L.J.E.'s user avatar
  • 153
2 votes
2 answers
342 views

QGIS select by expression based on different elements concatenated inside a string

Using the field filter or advanced filter expression in the attribute table of QGIS, I want to select features that have values in the first three levels and exclude features that values other than ...
CDEdwards's user avatar
  • 355
2 votes
1 answer
635 views

Using "Select by expression" in processing script context with PyQGIS

Is there a way to select features and use them in subsequent algorithms within a processing script context? I am looking to iteratively selectbyexpression a subset of line features in a layer based on ...
Stats's user avatar
  • 23
3 votes
1 answer
1k views

QGIS: Select polygons that are touching another polygon on all it's sides (not contain but engulfed?)

Given this polygon: I'm trying to select the inner one, but can't find a simple way using either selection by location or selection by expression Any idea?
codekoriko's user avatar
5 votes
2 answers
563 views

Selecting only polygons that contain another polygon with Select by Location in QGIS

In QGIS 3.16.11 on Windows 10 I have a layer with single polygons. Given this polygon layer with, I'm trying to select only the polygons that that contain at least one other polygon (A & B) My ...
codekoriko's user avatar
8 votes
1 answer
1k views

Selecting features visible in map extent using QGIS

In QGIS, I'm trying to select all the features that are visible in my map extent but I can't find a solution with "select by expression" or something else. I will use your tips inside ...
katagena's user avatar
  • 1,624
6 votes
1 answer
216 views

QGIS expression not working as expected: selecting nearest neighboring points of a selected point

The problem In QGIS 3.20.0 (Win 10), I have an expression that does not work as expected and I don't understand why. On a point layer, one point is selected. When using Select by expression, the ...
Babel's user avatar
  • 70.4k
7 votes
3 answers
2k views

Selecting multiple features by ID-attribute from list using PyQGIS

With PyQGIS I would like to use several "ID"s (in a list) to select certain objects in order to make them available later in a temporary layer. I know how to select one or a few more objects,...
cc_schr_gis's user avatar
0 votes
1 answer
32 views

Selecting records having special char record

I am trying to select all records which have special char (I'm not mention any specific special char) Like below: ADDRESS_N LIKE '%Ö%' or ADDRESS_N LIKE '%Ü%' or ADDRESS_N LIKE '%ß%' or ADDRESS_N ...
RakeshReddy Posham's user avatar
0 votes
0 answers
40 views

Iterate a feature by expression with unique values in PyQGIS [duplicate]

Im trying to automate the process of select by expression and afterwards export it to a new layer in Qgis using Python. The Layer I'm using is called "Brutvoegel" and my goal is to get all ...
Moritz R's user avatar
2 votes
0 answers
134 views

Iterate through list with numbers (as text)

I want to iterate through a list of coordinates and see it the last coordinate matches the first coordinate. The coordinates are stored in have a GeoJSON string: '''{"type":"...
GIStrees's user avatar
  • 119
10 votes
1 answer
193 views

Selecting NULL or date values by Expression in QGIS

How can I select by expression from a date field in a shapefile, dates that are NULL or >= 2020-01-01? This doesn't work, it only selects those with dates >= 2020-01-01, not the NULLs "...
BERA's user avatar
  • 71.2k
1 vote
1 answer
226 views

Deleting lines crossing particular features from another layer using QGIS

I have two QGIS layers. Layer 1 has a floor plan with an attribute field holding feature types, e.g., wall, corridor etc. Layer 2 consists only the lines drawn between door centroids. I want to query ...
mdgcrks's user avatar
  • 53
4 votes
1 answer
99 views

Automate the selection of duplicate geometries with QGIS3

I have a layer of buffers calculated from watercourses. Each watercourse/buffer has a Strahler Order (0 to 7). I need to delete overlaps between buffers order 0 and buffers order 1 to start, but ...
Juliette Lapeyre's user avatar
0 votes
0 answers
77 views

How to performing selection by expression using QGIS

I am using QGIS 3.8. I have a grid (hexagon) and a set of points. I am trying to select the hexagons containing at least 1 point. So far nothing complicated. Except that sometimes my points overlap 2 ...
Pauline's user avatar
  • 11
0 votes
1 answer
404 views

Select and list all the adjacent features of a feature in ArcGIS

I have a shapefile of the Zips of California like the attached image. What I want is to select the adjacent/neighboring polygons (those touch the boundary) of each polygon in ArcMap and want to create ...
Ashad Alif's user avatar
4 votes
1 answer
104 views

Selecting by attributes on features sharing common value

I have a point vector with features sharing non-unique "ID"s. Each feature also has a "distance" field. I want to select among each set of features sharing the same "ID" ...
Selenium's user avatar
3 votes
1 answer
503 views

Select features from the attributes table without opening it in QGIS

I have an attribute table with a vast amount of data in QGIS. I need to export only some of the features. Is there any way to select features without opening the attributes table?
Elham's user avatar
  • 419
-1 votes
1 answer
454 views

Selecting a specific number of features in QGIS [duplicate]

I have a layer with several fields on its table and one of these fields is "population". Is there a way to select only the top 3 features with the highest population? I imagine I need to ...
Noe's user avatar
  • 117
1 vote
1 answer
369 views

Is there a way to sort the QGIS attribute table by date modified?

I was wondering if there was a way to sort the attribute table in QGIS Pi by date modified. I have been digitizing a large area and I need to delete the last 50-100 features that were digitized. My ...
AndrewRobert's user avatar
2 votes
1 answer
83 views

Problem selecting features with % operator

I am having problem to select contours with the following expression: "ELEV" % 0.05=0 As I understand this should select any contour that the remainder of the division by .05 is 0. For ...
Gerardo Jimenez's user avatar
4 votes
1 answer
713 views

Selecting multiple rows in feature based on contents of list using PyQGIS

I am trying to select rows in a feature layer in QGIS based on the values in a list. I am using PyQGIS in the python console If I just specify one item to find in a column called "gps_code", ...
TrevP's user avatar
  • 611
2 votes
1 answer
201 views

Python script to set another layer inactive & select point by outside of boundary line?

I have two layers, "IDN_ALL" as Polygon and "Point_Link" as point. "Point_Link" is the active layer. I want to select point data outside polygon data. Code: Layer1 = ...
adham CMajid's user avatar
4 votes
2 answers
245 views

Selecting features whose text is equal to the text after certain word in QGIS

I have origin-destination lines and I'm looking for intra-city lines or lines whose origin and destination are in the same city. A sample intra-city feature would be "Quezon_City to Quezon_City&...
BallpenMan's user avatar
  • 1,217