Questions tagged [select-by-attribute]
To select data records according to logical criteria applied to their field values ("attributes")
591
questions
0
votes
0
answers
18
views
Selecting minimum and maximum values in Select By Attributes using ArcMap [closed]
Can I select Layer from max value to new selection?
0
votes
3
answers
51
views
Deleting feature from Costa Rica shapefile using ArcMap
I would like to remove an island from the Costa Rica shapefile. This island is highlighted in the attached picture. There is not enough information in the attribute table for this island and that part ...
7
votes
2
answers
133
views
Selecting items in the attribute column based on items of the other layer in QGIS
I have the items in my data attribute table, which were selected. What I want to do is make the object with the same value to be selected in the attribute table, which belongs to another layer. In ...
4
votes
2
answers
134
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 ...
4
votes
3
answers
122
views
Selecting certain text from attribute values in QGIS using field calculator
I am using QGIS 3.16 (Field Calculator). I have a number of values in the attributes of my GML file that read:
'Nonconiferous Trees' or
'Nonconiferous Trees (Scattered)' or
'Nonconiferous Trees, ...
0
votes
1
answer
35
views
Square brackets are causing SQL syntax error for ArcPy SelectLayerByAttribute [closed]
I have been trying to use ArcPy’s SelectLayerByAttribute funciton and I can get it to work with this code:
arcpy.SelectLayerByAttribute_management("LAYER", "NEW_SELECTION", "...
4
votes
3
answers
123
views
Selecting features in one layer based on mutual field with another layer in QGIS
I have two layers in QGIS, each one with a field called "Name". I need to select the features in 'layer2' whose name exists in 'layer1' (totally or partially).
For example, in the images ...
1
vote
1
answer
61
views
Select rows using Python? (without creating a new field or table)
ArcMap 10.7.1 — Oracle 18c SDE.ST_GEOMETRY — Polyline FC
Occasionally, we come across scenarios where we want to select rows in a FC in the attribute table, but there isn't a way to run the query ...
5
votes
3
answers
300
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 ...
0
votes
0
answers
50
views
Select attributes from a layer using Python dictionary keys
I made a script to find duplicates of cables in a layer and I recorded the REFERENCES of these duplicates in a dictionary.
Now I want to do a SELECT By Attribute with ArcPy to get the duplicates from ...
3
votes
1
answer
67
views
Select values that are the same in another column in another layer
I'm working n QGIS 3.10.7-A Coruña. I have two layers: point.shp (670 features) and line.shp (4500 features). Both of them have a column called "code" with string values. I want to select ...
0
votes
0
answers
39
views
Comma separated text in attribute tables
I'm creating a shapefile of all the sports units of a state in India. Units can have multiple infrastructure. There are 6 kinds of infrastructure. Sometimes a single unit can have multiple ...
-1
votes
1
answer
37
views
Subsetting a specific number of features in a large dataset so that they are all together in ArcMap
I have a very large feature layer consisting of polygons of different sizes. I need to select or subset a certain amount of features (say I need 4 polygons of size x, 6 polygons of size y, and 10 ...
1
vote
0
answers
17
views
ArcPy select by attribute fails with invalid syntax error message [duplicate]
I am trying to use ArcPy with ArcGIS Pro v 2.8 to select by attribute from two different attributes in a shapefile. My code fails with a ERROR 000358: Invalid expression.
I have used ModelBuilder to ...
7
votes
3
answers
164
views
Selecting latest record by date
At 3.22.1 I have a GeoPackage attribute table containing the string field: box_id and the date field: inspection_date. The table rows look like:
box_id inspection_date
NE_01_01 2021-05-01
...
0
votes
1
answer
42
views
Setting variable field names for SelectLayerByAttribute SQL query
I'm attempting to create a more flexible approach to calculating fields used in the Where clauses in Select by Attribute SQL queries.
Is there a way to keep my current approach (below) while using ...
5
votes
2
answers
192
views
Selecting only one minimum value by expression in QGIS
If there are two values that are equal and minimum, the minimum function in "Select by expression" returns both of them.
Is there any way to select by expression only one of them? If not, ...
0
votes
1
answer
40
views
ArcPy select analysis date field > date variable
I am sure this is probably a simple syntax fix but I receive invalid syntax errors during the Select Analysis when trying to select records where the date field in my file geodb (ISS_CST) is greater ...
0
votes
1
answer
41
views
Creating where_clause in ArcPy gives ERROR 000358
I would like to create a query in ArcPy without creating a temporary additional attribute first. Unfortunately I fail with the syntax for creating the expression. I want to check if a ratio of two ...
4
votes
2
answers
172
views
QGIS Setup n:m relation to enable cross-layer search
In QGIS I want to set up a n:m relation between two tables "parcels" (polygons) and "owners" (no geometry). Both share a field index1 (containing of numbers and letters) by which ...
6
votes
1
answer
85
views
Selecting duplicate records except the first and last duplicate with Select by expression in QGIS
I'd like to know how to select duplicate records except the first and last one, with the "Select by attribute/expression". On GIS SE I found a solution for selecting duplicates except the ...
1
vote
1
answer
75
views
Selecting values in attribute table which have alternate same values in two different columns
I am looking for ways to select features in attribute table which have same values but in different column.
In the picture below as you can see "fid_2" has values which match "fid" ...
2
votes
1
answer
203
views
Showing only filtered features using Rule-based symbology in QGIS
I have a layer called 'A' with a filed called "B", under this field, there are multiple values such as "C, D, E..." (one value for each row/feature in the attribute table). I have ...
0
votes
0
answers
50
views
Realizing arcpy.mapping.MapDocument("CURRENT")
I am curious as to how arcpy.mapping.MapDocument("CURRENT") works. I used to execute highlight in the sub thread, but didn't work.
Does it only work in the main thread (including arcpy....
0
votes
0
answers
65
views
Selecting features in multiple columns by attribute using ArcMap without Python code
I am using ArcMap.
I have a shapefile with multiple features and multiple fields. Some of the field values are repetitive and I would like to apply a filter to select according to them. E.g. By ...
2
votes
2
answers
49
views
Selecting several cross section on a specific distance using expression
I have the following river cross section lines. I want to select cross sections which is multiple of 10 from the attribute 'TR_SEGMENT' (Eg: 1,10,20,30...etc) or any "nth" sections. What is ...
1
vote
1
answer
47
views
Selecting column in data attribute table reliant from different column
I have the problem because after extracting vertices from my linear geometry layer I have so many duplicates in my data attribute table (taking into account a unique "ID" of each line). ...
0
votes
2
answers
40
views
Running same action multiple times in ModelBuilder model with increasing expression value
I have created this ModelBuilder model
in above expression value is 1 by default but I want to run expression value 2,3,4,5 and up to 50 (it may vary based my dataset).
I tried for while iteration ...
-1
votes
1
answer
65
views
Autofilling attribute fields with text using ArcGIS Pro
I have a shapefile containing over 18,500 polygons which are classified land uses of Ireland. I am trying to then put these classifications into a macroscale as per CAFRE directive - urban, suburban, ...
3
votes
1
answer
89
views
Selecting features based on one to many relation in QGIS 3
There are two layers: [1] one is a polygon layer with an "ID", [2] the other one is a table with one or many owners for each "ID".
My goal is to select every polygon owned by a ...
5
votes
2
answers
254
views
Selecting features by expression with SQL syntax in QGIS
I have a table (shapefile) in QGIS where I want to select features that satisfies this condition:
group by a field ("join_label") and within the "grouped field", pick the attribute ...
1
vote
2
answers
72
views
Select attribute using Python [closed]
I am using python to select every 1000 attributes in the attribute table. For example, 1:1000, 1001:2000, and so on. How can I write this as a for loop?
1
vote
1
answer
52
views
Make feature layer managment
I have a feature class that includes 49 points (records). I want to select specified FID that I've mentioned before for example my_fid = (0,1,3,4,5,6,7,8,12,45). so I want to select this fid with ...
0
votes
2
answers
80
views
Select layer by attribute based on multiple field attribute values in a list
I have a list of street_names
['SH-701', 'SH-67', ' ABC', 'Dharampur Road', 'Kailash Road', 'Tithal Road', 'SH-6', 'Halar Road', 'SH-183', 'Ramji Tekra Road', 'Mahatma Gandhi Road', 'Bandar Road', 'M ...
2
votes
1
answer
49
views
Iterating through attribute in layer to create new layers
I am working on the school project in QGIS, in which I have Price map of the buildings in a vector layer. Each polygon has its price attribute. The maximal value of price is 20 000.
I would like to ...
3
votes
1
answer
348
views
Selecting feature from VectorTile in OpenLayers
I've problems with a selection of a feature from VectorTile. I've no problem with selection using Vector:
var vectortile_layer = new ol.layer.Vector({
source: new ol.source.Vector({
url: ...
2
votes
1
answer
104
views
Filter objects in attribute table by minimum value
I have a line layer which contains the attributes "id" and "network_cost". There are lots of objects with the same id. For example, there are 500 objects with the id "ABC"...
0
votes
1
answer
46
views
Extraction of single point layer out multiple points (having same lat lon) using Line feature in QGIS
I am having point feature with same latitude and longitude so placed one over other in multiple places. like figure one:
I have line feature which having stormID which is same as storm id in point.
so ...
0
votes
1
answer
35
views
Building selection query by looping through list [closed]
I would like to create a tool that selects census tracts based on input from a user. I have created an expression connecting values using "OR" but cannot figure out how to complete the ...
1
vote
1
answer
148
views
Alternative to nested loops with fourth level depth in PyQGIS
I am developing a processing plugin for QGIS 3.10. I want to avoid nested loops when filtering one layer based on another layer. How can I implement this?
I created some random layers/data for this ...
3
votes
1
answer
118
views
Removing duplicate features in QGIS based on two conditions
I have duplicates (maybe triplicates) in an attribute table and would like to remove the duplicate locations based on comparison to the other duplicate. For example:
Scenario 1:
I would like to ...
0
votes
0
answers
71
views
Creating user input parameter inside selectbyattribute query in ArcPy
I'm new to ArcPy and Python in general. I'm experimenting with Python within ArcGIS Pro, but I've encountered an issue, here is the code:
import arcpy
arcpy.env.workspace = "C:/Users/Nastgardaren/...
1
vote
1
answer
163
views
ArcGIS Pro Select by Attributes misses records?
Has anyone had this happen to them? I'm running Select By Attributes on a feature class to select shape area less than 300, but only a fraction of the records that match the query are being selected.
...
3
votes
1
answer
79
views
QGIS maximum function returns too many records
At 3.18.3, I am working with a standalone Geopackage attribute table containing data for a threatened bird species who are nesting in bird boxes.
The nesting boxes are periodically checked and the ...
1
vote
2
answers
272
views
Select and Extract spatial attributes in R
I want to select features in a polygon shapefile on the basis of a selection criteria. In ArcGIS, one can do selection by attribute and then export selected data as shapefile. How can the same be done ...
1
vote
1
answer
176
views
QGIS / Python - Select features until the cumulative sum target is reached
I have a polygon feature of municipalities with the value of production of some good in the attribute table field production. I need to know which are the municipalities with the lowest production ...
3
votes
1
answer
135
views
Selecting and displaying all of items with same value in attribute table using ArcMap
One of the columns in my attribute table is entitled NAICS_1 and I'm supposed to display only the objects with an NAICS_1 of a specific value.
How do I filter the attribute table using ArcMap to only ...
0
votes
1
answer
40
views
ArcPy SelectByLayerAttribute_management does not select when provided with path of file
I've been doing some experimentation with SelectByLayerAttribute, and I've noticed that it does not select anything when provided with the path of a feature layer (e.g. 'C:\Users\Sean\OneDrive\...
0
votes
2
answers
71
views
arcpy.SelectLayerByAttribute_management not selecting anything
I need to run a process on selected records only in a feature class stored in Enterprise geodatabase (SQL Server) that meet a certain condition:
WC = "Status = 'U' AND IN_City = 'Big City' "
...
1
vote
1
answer
154
views
ArcPy Select by attribute using create date
I'm writting a Python script that will look for newly created features and update them. This script will be automated to run every day at the end of the day.
I'm using the Select by attribute tool to ...