Questions tagged [select-by-expression]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
73 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 ...
3
votes
1answer
50 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?
5
votes
2answers
92 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 ...
6
votes
1answer
100 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 ...
6
votes
1answer
95 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 ...
7
votes
3answers
448 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,...
0
votes
1answer
30 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 ...
0
votes
0answers
25 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 ...
2
votes
0answers
44 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":"...
1
vote
1answer
42 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 ...
4
votes
1answer
56 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 ...
0
votes
0answers
27 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 ...
0
votes
1answer
74 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 ...
4
votes
1answer
63 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" ...
3
votes
1answer
167 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?
-1
votes
1answer
71 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 ...
1
vote
1answer
81 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 ...
2
votes
1answer
69 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 ...
3
votes
1answer
176 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", ...
2
votes
1answer
142 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 = ...
4
votes
2answers
89 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&...
0
votes
0answers
64 views

Make Feature Layer / Select / Select Layer By Attribute "Get Unique Values" grayed out in ArcMap ModelBuilder [10.8.1]

I'm trying to extract road segments from a feature class through ModelBuilder in ArcMap 10.8.1 based on attribute queries, but the "Get Unique Values" button does not pull up a list of ...
2
votes
1answer
56 views

Select by expression based on common ID

Background I need to select features (parcels) from an official source based on a list with no geometries provided by a client. Both data sets have a common, unique ID (parcel number). There are about ...
2
votes
2answers
129 views

QGIS expression to check if a an attribute value of a feature exist in another attribute column

I have a shapefile with two fields 'Name' and 'CountyFacilityID'. I would like to create an expression to select all features where Name exists in the CountyFacilityID column for any of the features. ...
1
vote
1answer
130 views

Create new shapefile for each unique attribute using for-loop with PyQGIS?

I have a roads shapefile. In its name field, I'll create a new shapefile per attribute. I already got each unique attribute under name. The for-loop that iterates over the unique attributes and ...
7
votes
2answers
124 views

Analysing point attributes within polygons

I'm using QGIS 3.4.4. I have a polygon layer and a points layer. The points have the attributes district and streetname. How can a check if all the points within a polygon have the same district and ...
3
votes
2answers
662 views

Selecting more features with "ILIKE" and "IN" operators using QGIS

I would like to select more features with expression in a specific field, which contains the name of the attribute (IN operator is useful). Moreover, the name could not be exact, so the ILIKE operator ...
3
votes
1answer
99 views

QGIS increase number of recent selections

is there any possibilty to increase the number of recent selections in the menu select by expression? I can´t store more than 20 selections. If I create a new selection, the oldest selection is ...
3
votes
1answer
324 views

Showing string that contains specific number in QGIS

How to show all the strings that contain '841' on this layer? I tried to use "NAME" LIKE '841' but somehow it did not just show "841_1Q" and "841_1", instead it still ...
2
votes
0answers
1k views

Select by expression only for selected features using PyQGIS [duplicate]

I'm facing a nested problem using PyQGIS (for QGIS master, but it can be replicated in any version of QGIS 2). I have a vector layer with some selected features and with a QgsFeatureRequest I can ...
4
votes
2answers
1k views

Selecting from selection with PyQGIS

The expression box has a handy "select from selection" button. Is there a way to emulate this with Python? I have the basic expressions down, but can't find a way to do this.