Questions tagged [select-by-attribute]

To select data records according to logical criteria applied to their field values ("attributes")

Filter by
Sorted by
Tagged with
0
votes
1answer
25 views

Automate Selection/Copy Features from Selection

I am new to Python and ArcPy, but I would like to automate this process and/or make my code more efficient here. I am basically selecting a layer by attribute, then copying features from the (selected)...
1
vote
1answer
28 views

Selecting by attributes which have alphabet data using ArcGIS Field Calculator? [on hold]

I only want to select values that are entirely alphabetic characters. Select by attributes which I have alphabet data. SELECT ONLY RED INDICATED VALUES
0
votes
0answers
27 views

Using Select by Attribute with multiple layers in ArcGIS Desktop? [on hold]

I'm using ArcGIS Desktop 10.3 and am trying to find "Bangalore" in a field named "City" and I want to find and select for all layers. I do not want to go into every single layer for find and select. ...
0
votes
0answers
28 views

Iterating through values in Attribute field and performing selection using ArcPy?

I am using ArcGis Pro 2.4 python window. I have seen suggestions of using "SearchCursor" but am unclear how to utilize this tool in the Where-Clause in my SQL selection statement to select by ...
2
votes
2answers
119 views

Searching for single buildings in QGIS

I want to search for different buildings by using the labels I've added to them. Like for instance, I want to search for the building with the label "1630", as in the picture. Is there any specific ...
0
votes
2answers
37 views

Selecting multiple date ranges using Select By Attribute?

Using ArcGIS Desktop 10.6.1. I'm interested in selecting multiple date ranges using Select By Attribute. I've verified that each date range works. For example Date >= '2015-04-15' AND Date <= '...
1
vote
1answer
37 views

Select by Attribute error - ArcPy [duplicate]

I have a table of points that looks something like this: year, latitude, longitude 2018, 42.02, -87.68 2018, 41.91, -87.78 2018, 41.64, -87.68 2017, 41.63, -87.56 2017, 41.89, ...
1
vote
1answer
42 views

Accumulate selections by expression using a for loop (Pyqgis)

I need to run a for loop to select features by their attributes, because the values are within lists (strkey and strvalue). I'm using the following script: k=0 v=0 layer = iface.activeLayer() for ...
2
votes
1answer
23 views

Exporting data by month/year using ModelBuilder?

Using ArcGIS Desktop 10.6.1. I have a large dataset that I need to view sequentially by month AND year. Instead of using Select by Attribute for each month/year combo (i.e. February 2017-May 2019 for ...
1
vote
0answers
24 views

Creating a dataset from attributes in QGIS Graphical Modeler

I need to select just a field from a dataset to compose a model in QGIS 3.4 modeler. How could I extract this field from the main dataset while creating another one?. I've tried with Drop field(s) ...
1
vote
2answers
70 views

Selecting by attribute using Python and a list

I have been using this script to select a feature using Python: layer = iface.activeLayer() layer.selectByExpression('\"Declividad\"= value', QgsVectorLayer.SetSelection) selection = layer....
1
vote
1answer
23 views

Locating records not in selection using ArcPy?

I have a list of addresses that I need to contact. Some are listed in the attribute table, and some aren't. I'm trying to find the ones that aren't. The list: contacted = ['123 STOWE ST', '123 ROSE ...
0
votes
1answer
42 views

How to Select Attributes from a Selection of Attributes

I have a land-cover map for an area in which I want to identify certain attributes that fall within a category. I want to select the shapes that represent wetlands that are in a grassland area. To do ...
2
votes
2answers
121 views

Comparing and find out which feature has highest shape area in QGIS?

I need to find out which polygon is having more area by filtering unique ID. the problem is I have 1000 of features which I need to find out highest occupied area for every unique value... since I ...
0
votes
2answers
34 views

Getting SyntaxError from ArcPy Select by Layer?

I am currently wondering what is the fastest way of using Select By Attributes in arcpy. I have a GDB with a feature class that is quite big. This feature class has a field called CODE with values of ...
1
vote
0answers
41 views

Cannot set input into parameter error on second iteration

On the second iteration of the loop starting line 7 I get the following error. Everything works as intended on the first iteration. Any ideas on why this is failing the second time around? Error: ...
0
votes
1answer
47 views

Selecting max value in SQL query from Extract by Attributes?

I currently have a raster that has 3 columns in the attribute table: OBJECTID, Value, and Count. As part of ModelBuilder, I am running this raster through the Extract by Attributes tool. The Extract ...
1
vote
1answer
29 views

Selection using wildcards [closed]

How can I use wildcards (*) in the ArcGIS Query Builder? It cannot refine my work in Select By Attribute function. 'AA03-FE-P006R' 'AA03-FE-P007R' 'AA03-FE-P006L' Right (Asset_Code,1) = 'L' This ...
0
votes
0answers
96 views

Why is internal memory not overwritten?

I have the following code in Python for ArcMap to first select a property polygon and then with this selection to intersect the layer which contains lines (sewers) (which pass through or are within ...
0
votes
1answer
42 views

Writing where_clause to Select Layer By Attribute for Python Add-in?

I have an add-in script for a toolbox in ArcMap that lets a user select a data frame, a layer within it, a field from the layer, an operator (= , > , <, etc.), and a value from the field. I'm ...
1
vote
0answers
24 views

Executing Select Layer By Attribute in Python Add-in Toolbar (ArcMap)

I'm having trouble with the button class of my code: class OKButton(object): """Implementation for ok.button (Button)""" def __init__(self): self.enabled = True self.checked = False def ...
0
votes
1answer
20 views

Select By Attribute - Get Parameter as Text - User input SQL ArcPy

I am trying to create a script that will search for suitable site locations. I want to let the user input an area size (e.g. >20) to be searched but each time I run the script it comes up as Error ...
-1
votes
1answer
26 views

Select by using ArcPy? [closed]

From the below table: If number of ID_T's counts is more than 2 then, I have to select, same ID_T but DIST value vary of minimum 10 meters
1
vote
1answer
41 views

Select by attribute not working [closed]

I created a point shapefile by converting a raster into points. The default fields generated were FID, Shape, POINT_ID, and GRID_CODE. I added two new fields "X_location" and "Y_location". I ...
0
votes
1answer
41 views

Trying to use a SelectByAttribute_mangement after I made the XY Event layer

I imported a CSV file using the MakeXYEventLayer_management and trying to use the SelectlayerByAttribute_management function, but I am getting error message saying on "Object ID(OID)" is present.. Is ...
4
votes
1answer
167 views

Selecting and updating attribute values using Python console in QGIS?

I am working with Landusefc and Class columns (ref table). What I want is: Selecting all water from "Class" and giving a value say '8' in the "Landusefc" column for these selected features. Table ...
0
votes
1answer
31 views

SQL wildcard for Field Name?

I'm wondering if there's anyway to use a wildcard character in a field name. Like using ["Species_%" = 'Hemlock'] instead of ["Species_1" = 'Hemlock' OR "Species_2" = 'Hemlock' ...]. I tried the way ...
0
votes
2answers
66 views

ArcGIS 10.5 Python toolbox problem SelectLayerByAttributeERROR 000358: Invalid expression Failed to execute

I am trying to create a .pyt that find and select an object in an specific layer but I have a problem. I'm working on the Desktop version 10.5 and actually the code is this one: def getParameterInfo(...
0
votes
1answer
39 views

Select by attribute with field equal to element of vector in ArcPy?

I am trying to select by an attribute with a condition that field equals to an element of a vector. I use a for loop but could not get the right expression for this condition. Here are my codes. ...
-1
votes
1answer
50 views

How to select attribute specific values? [closed]

I have table like I need to select if R_no values is more than two same values and in ANGLE select first three numbers common and more than three attributes is same Finally I want to select like ...
0
votes
1answer
35 views

Counting attribute value based on location using ArcGIS Pro?

I have a school district polygon divided up by neighborhood, and I am trying to determine the number of students from each grade per neighborhood. The student point file contains an attribute with ...
2
votes
1answer
52 views

Select Contour by Length

I am a real beginner with QGIS 2.8. I am able to generate a contour map from a raster DEM, but the contour map is very 'busy' because the land form is pretty flat. There are lots of short contour ...
0
votes
1answer
34 views

Using keyword in SelectByAttribute expression?

I've used SearchCursor to return the single value of a record (8 digit number) for row in arcpy.da.SearchCursor(table, ['PID']): if row[0] is not None: ID = row[0] break Now I would like ...
1
vote
0answers
16 views

Select by attributes ModelBuilder - text string partial values for parameter

I have a feature class of suburbs that I want to do a select by attribute on the Locality (=suburb names) field, passing a user input string parameter to selection expression. I have the query ...
1
vote
1answer
140 views

Getting particular feature using expression in PyQGIS? [closed]

How to get a particular feature using an expression in PyQGIS? For example, there are 100 houses (with 100 entries in Attributes Table). I want to get only one house with field name ("name"=="John's ...
3
votes
1answer
17 views

Calculate a field using text from another field separated with comma

I have an address field containing the following text: "64,ramkoti,hyderabad,500070" I need to copy hyderabad to another field. What would be the code used in the field calculator tool to achieve ...
0
votes
1answer
75 views

Getting ERROR 000840 from arcpy.SelectLayerByAttribute_management? [duplicate]

I am trying to select layer by attribute and for that, I am using arcpy.SelectLayerByAttribute_management function . My command is as follows: arcpy.SelectLayerByAttribute_management(union, '...
0
votes
1answer
49 views

Selecting by attribute by specific characters fields

I have a field "HNR_S". It contains values like "124", "122", "1315", "1465", "15151", "124512642". How can I select more than three numbers?
0
votes
1answer
40 views

Filtering attribute table based on names in another table using QGIS?

I have a shapefile showing a list of district names. I have (currently in Excel) a long list of district names in a table. I would like to filter those districts that are in the other list. I think ...
0
votes
1answer
29 views

ArcPy - Select Layer by Attribute / Delete Selected Layer - SQL

I feel like I've tried so many iterations of this, can anyone assist with how to use ArcPy to selected layer by attribute then delete selected layer? I think my SQL query is incorrect? import arcpy ...
1
vote
1answer
37 views

Cannot select by attribute for new attributes added by join in ArcGIS Pro?

I'm new to ArcGIS Pro and am following some tutorials. I did a join to add some data to the attribute table of one of my layers. Now, when I go to select by attribute and look for those attributes ...
1
vote
0answers
24 views

Automatically select a feature from another layer based on shared attribute in QGIS [duplicate]

I have two shapefiles, A (polygons) and B (points), and I need to select all features from shapefile B that have the same attribute (for example, "Name") as shapefile A, and I need to do this ...
1
vote
0answers
53 views

QGIS: Add attribute from polyline layer to point layer [closed]

I want to add an attribute from a vector line layer to a vector point layer. The vectorline is railwaynetwork. It has been divided into segments automatically. To process the data further I had to ...
2
votes
1answer
53 views

Select by attribute does not work on an indexed field

I came across an issue where I can no longer run a select by attribute on a field (In my example it is "Students_7") in a shapefile that previously worked. Even when I build the query using the wizard ...
0
votes
0answers
33 views

Selecting layer by attribute in Python Toolbox of ArcPy?

I have this code where te input parameters are a shapefile [param0] and a string list [param1]. The second parameter is a list because I want that user select it. class Tool(object): def __init__(...
1
vote
0answers
27 views

QGIS Atlas Feature for multiple polygons with same attribute [duplicate]

I have a shapefile of city blocks in a given city. Each polygon represents an individual lot, but the attribute table includes a column called "sector", that denotes the zone of the city that the lots ...
2
votes
1answer
41 views

How to use SQL queries in arcpy.SelectLayerByAttribute?

I'm trying to select features from a layer that I know exist. I'm using SelectLayerByAttribute_management in arcpy. I have a layer that is properly defined earlier in the code named "tourmaline". I'm ...
2
votes
1answer
51 views

How to extract records with a specific but shared attribute

My goal is to isolate the ID#s observed in Zone C and only Zone C (like IDs 2236 and 3007 in the attached table). There are records for which the same ID was observed in other zones besides Zone C, or ...
0
votes
1answer
30 views

Selection by attribute from list

I need to select a layer with all attributes while the selection comes from a table. With my code I get only empty feature classes and emtey Excel files. The tab_list Elements are the selection value. ...
0
votes
0answers
26 views

Selecting values with date-format by using SelectLayerByAttribute_management with input Parameter

I am working on a Tool which selects records depending on the input value. Works fine, till I want to select date-records. I used def buildWhereClause(self, table, field, value): # Add DBMS-...