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
51 views

Using input parameters to select layer by attribute

I am trying to create a Python-Toolbox with following Tool: inputFeature: A User has to load a Feature inputField: Then he has to to select a field from the Input Feature inputValue: At the end ...
1
vote
1answer
86 views

Selecting line with specific numeric field value using inline variable for arcpy.UpdateCursor()

I'm currently away in a remote field station using Arc 10.0 and having a hard time using an inline variable substitution for a numeric field value. I am trying to use UpdateCursor to select only a ...
1
vote
4answers
7k views

Zooming to selected features with ArcObjects

I am trying to figure out how to set the active view extent to be able to view all the selected features on the ArcMap. The Map has only one layer. The features are filtered with attributes. Below ...
4
votes
3answers
2k views

Selecting top 10 records in attribute table using ArcMap

I am using ModelBuilder in ArcMap 10.2 to try and find a way to select the first 10 records sorted by Category and then by Distance. For example, my table has 100 banks and 100 churches, which is the "...
4
votes
1answer
331 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 ...
3
votes
1answer
37 views

Limit on Filter Query Stipulations?

I am novice mapper. I ran into some trouble with QGIS today when trying to add additional census tracts to a layer filter. The tract exists within the layer I'm filtering, but there seems to be a ...
0
votes
1answer
45 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 ...
2
votes
2answers
63 views

Selecting latest date by expression

I am trying to select the latest date by expression in QGIS. I tried to use this code "Date"= maximum("Date"). But nothing was selected. I wonder what is the right expression code to select the ...
0
votes
1answer
41 views

For loop with SearchCursor stops after first iteration

I'm trying to iteratively select and export a layer using da.SearchCursor, but the loop stops after the first iteration. Here is the code: arcpy.env.workspace = ScratchGDB # infc= "PA" field = '...
0
votes
1answer
269 views

Arcpy SelectLayerByAttribute for loop with “ADD_TO_SELECTION”

I am a little bit confused with the "ADD_TO_SELECTION" possibility. I process a point layer. First, the idea was to process the points with the different GBAUPS attribute separately. And it worked ...
0
votes
1answer
39 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
1answer
22 views

Creating a layer with selected values (divided by commas) from another layer - query or model needed

I have a very large dataset in ArcMap 10.6 and I would like to create a subset that selects only rows that have specific attributes (some of them with special characters) from a field that in my case ...
0
votes
0answers
26 views

SelectLayerByAttribute_management not selecting anything

I've read through most of the other similar questions and nothing so far has addressed my issue; most are about syntax. I'm trying to select by attribute from a Feature Layer. But every time, Arc ...
1
vote
2answers
33 views

SelectLayerByAttribute_management selects all of type of attribute instead of specific one?

I want to create a tool that allows a user to select all the points within a specific zip code by inputting that zip code. The code below selects ALL of the points with a zip code - which is all of ...
0
votes
1answer
26 views

Selection of duplicate values of column and update of another column based of selection using ModelBuilder?

How to select a row in ModelBuilder if a number appears again in the column "MyName_C"? For the selected features the column "Ausrichtung" should be added with 180. I am working with ArcGIS ...
0
votes
0answers
19 views

Selecting Polygons of one layer with information from table using ArcGIS Desktop?

I have two 2 datasets: A shapefile with many polygons. They all have an ID. A table (.csv) that has one column with IDs. I need to select all Polygons in 1) that are mentioned in the column of ...
0
votes
1answer
11 views

Defining categories adds previously unselected attributes (ArcMap)

I am using ArcMap 10.5.1 and want to create a layer from a selection of another layer (Selection > Select by attributes..). This works fine and my new layer is displayed. Now I want to assign ...
0
votes
1answer
28 views

arcpy.SelectLayerByAttribute_management ExecuteError

This python code works in ArcGIS Pro but Not in ArcMap . I read some issues that mention a get around by making a feature layer. I tried that and I then get an error saying polytest doesn't exist. ...
0
votes
1answer
78 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
0answers
32 views

Invalid expression in SelectLayerByAttribute?

I am coping with a shapefile and I want to select some rows if the values in one column are in a Python list. The following gives the code I write: tpu_involved = list(set(dataframe['SmallTPU'])) ...
0
votes
2answers
47 views

Select by Attributes query ArcMap 10.5.1

I am trying to find capitals with a population between 200,000 and 300,000 and I do not know how to build the query correctly. Here is what I have, but it doesn't work:
0
votes
2answers
37 views

Selecting multiple attributes with variables using arcpy

I'm working on a program for my work and I'm trying to select multiple power line segments from the same shapefile. I'm having trouble with my SQL syntax to pass both variables on to the selection ...
0
votes
1answer
29 views

Query of five fields using ArcPy in ArcMap?

I am using a long script for doing this query using select by attribute: this is the following code: are there any shorter form to do this?: level1 = arcpy.GetParameterAsText(0) level2 = arcpy....
5
votes
4answers
3k views

Filter by attribute to show only records with whole numbers

Is there a way to show points that only contain whole numbers in a column (eg. 009, 010, 011 and NOT 9,1; 9,2; 9,3...) in ArcGIS 10?
9
votes
2answers
9k views

Select layer by attribute using SQL statement LEN() in ArcMap?

I want to query the length of a string column and thought to use: LEN([ColumnName]) > 5 However, that doesn't work at all. I'm querying a table in a fGDB in ArcMap 10.1, hence the notation of [...
0
votes
1answer
35 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
32 views

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

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
1answer
119 views

Using attributes of polygon in one layer to identify polygons in another? [closed]

I am in the process of developing a web application, I am using open source tools so qgis, postgis, play framework for the web app. And I have come across an interesting problem that I'm trying to ...
0
votes
1answer
44 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 ...
0
votes
0answers
29 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 ...
3
votes
2answers
132 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 ...
34
votes
12answers
61k views

Exporting feature class into multiple feature classes based on field values using ArcGIS Desktop?

I have a feature class with over 2,000 features, and I need to make them all individual feature classes based on a field. Is there a way to do this?
0
votes
2answers
38 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
39 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
2answers
856 views

Using Python Search Cursor results to Select Features by Attributes

I would like to preface this by saying that I am very new to python and its capabilities. So my problem is that while using the in_memory work space I encountered some limitations in querying the ...
6
votes
1answer
5k views

Select By Atribute using python script on .Shp file getting error 000840 value is not raster layer

I have a script that calculating vertices angles on Polyline layer and the selecting features in that layer at a specified angle. at the end of the script i'm using select by attribute and getting ...
0
votes
1answer
44 views

Cannot find results of MakeFeatureLayer, cannot use SelectFeatureByAttribute [duplicate]

I have a goal: take a feature class, select some of the records by attribute, and make a layer for further processing. Should be simple, but I am having multiple problems. Note: I am working in a ...
1
vote
0answers
28 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
1answer
64 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 ...
0
votes
2answers
35 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 ...
2
votes
1answer
25 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
2answers
86 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 ...
2
votes
2answers
139 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
0answers
103 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 ...
1
vote
0answers
45 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
61 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 ...
0
votes
1answer
42 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
vote
1answer
59 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 ...
11
votes
3answers
14k views

How to select features using an expression with pyqgis?

How can I select features with pyqgis using an expression? I tried to use an QgsExpression but the select method doesn't take it: exp = QgsExpression("'ogc_fid' = 482") cLayer = canvas.currentLayer()...