The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
3
votes
3answers
134 views

SQL Query Syntax gives ERROR 000358: Invalid expression?

I'm writing a script that will cycle through a shapefile of building footprints for an entire state, create a folder for the individual counties in that state, and then intersect the building ...
0
votes
1answer
35 views

Subset a shapefile that excludes certain field values by using NOT in Select by Attribute where clause

I am using ArcPy 2.7 to subset a shapefile. I am trying to use arcpy.Select_analysis to exclude certain features from a shapefile (idle fields denoted as 1401 in the field 'Crop_Type'. my 'Crop_Type' ...
1
vote
1answer
810 views

Select feature by id in QGIS using Python

I have a ComboBox shows feature ids of selected features in a layer. I am trying to select one feature using ids in ComboBox currentIndex. I used setSelectedFeature(), but it didn't worked.I can't ...
1
vote
1answer
42 views

Blank attribute table after applying filter in QGIS?

I am completely new to QGIS and am looking for help with filtering OpenStreetMap data. When I applied a filter to the vector layer using the clause "building" is not null and test it, prompt shows me ...
2
votes
1answer
31 views

Select by character limit

I'm using the select by attributes to find unique values that I am copy pasting from a spreedsheet. EX "jobnumber" = 1111116 OR "jobnumber" = 2222245 OR "jobnumber" = 5555655 .. etc The problem is ...
1
vote
1answer
74 views

Filtering data in ArcGIS ModelBuilder?

I am not very experienced with the ModelBuilder and am new to ArcGIS Desktop. I want to use the ModelBuilder to select data from a polygon feature dataset in a first step. The dataset represents the ...
2
votes
2answers
71 views

Selecting a very Large Number of Column Rows based on a comma separated list of numbers

I have managed to do a lot of work regarding point data in the wrong projection, I forgot to change CRS from user 1000005 to BNG before I saved the layer as BNG so now it thinks it is in BNG only it ...
1
vote
2answers
719 views

Select Layer By Attribute Python Script Tool?

I'm trying to script another Select by Attributes tool. I want to be able to find a specific building using a field and zoom in to the location. However, my tool needs to allow a user to input any ...
3
votes
1answer
114 views

Selecting polygon features that are not fully contained against neighbors in QGIS?

In QGIS what would be the best method to select features that are not fully contained against it's neighbours? For example I want to select local authorities that have a coastline so in the example ...
4
votes
2answers
370 views

How to select rows with highest value per group?

I have a .DBF file that contains the number of establishments for each major industry in every county in Florida. I would like to select each of the industries with the largest number of ...
3
votes
2answers
4k views

Select features using an expression, QGIS

I've a problem when using Select features using an expression. I've an attribute table with many features: It's a shapefile from a previous CSV table. The data are localities for water analysis, where ...
0
votes
2answers
190 views

Why is SelectLayerByAttribute_management claiming “Column Does Not Exist”?

The solution to this question is not working for me. My error message: File "SumAreas.py", line 24, in arcpy.SelectLayerByAttribute_management(fc, "NEW_SELECTION, '"CLASS_CODE" = "A"') File "...
1
vote
1answer
149 views

Select by expression error [closed]

I am trying to create new shapefiles from an existing shapefile using QGIS 2.18. On getting to the select by expression box which I am doing by states, a state name appears twice. I have checked the ...
1
vote
2answers
444 views

ERROR 000358: Invalid expression Failed to execute (Select Layer By Attribute)

I'm using ModelBuilder to extract a layer by field values. I'm working on this field : I tried this method from Extracting by Attribute Using ModelBuilder with User Input? and it worked for many ...
1
vote
2answers
115 views

Calculate maximum value from a subset of fields ending with a standard suffix

I'm using the Python built-in function in the calculate field tool in Modelbuilder to calculate maximum values for each record from a list of fields: This is the field calculator expression I use in ...
4
votes
1answer
395 views

ArcGIS Select By Attribute with join returning extra, incorrect features?

I am attempting to run a simple Select by Attribute on a large File Geodatabase feature class (1,751,339 polygons) in ArcMap 10.6, but the query returns extra, incorrect records along with the ...
1
vote
0answers
146 views

Calculation of fastest path with in network analysis by qgis 3.0

I have a road network (with speed limit) and different points connected to the roads. I would like to measure the distance between several points along the roads. Basically I want to do shortest path ...
0
votes
0answers
72 views

Selecting Points by their Spatial Location to an Attribute of a Layer

I have a large point layer of addresses within a district. Each address point has a field called "Street External Key [SEK]" which is tied (meaning identical to) the corresponding "Street External Key ...
0
votes
1answer
81 views

Selecting intersected lines from two common attributes in very big data set?

I have a layer with lines representing cables. The data set is huge, over 100 000 polylines. Some of these cables lies within the same shaft, some of them lies within the same shaft as an other cable ...
1
vote
1answer
210 views

ArcPy not selecting layer by attribute when run in ArcGIS Pro?

Working in ArcGIS Pro with ArcPy, I'm trying to create a script that creates a density based clustering, performs a select layer by attribute on it and then takes the extent of that selection and use ...
1
vote
1answer
155 views

Making feature layer based on attributes (2 columns) in ArcPy? [closed]

I'm new to Python, but know this tool can solve my problem. I have a large dataset and I want to extract layers based on the attributes of two columns. For example, my dataset has columns A-N. In ...
0
votes
1answer
102 views

Selecting objects from a feature layer by attribute using OR?

I need to select all objects from a feature layer where a certain field called ESTATE meets 'rule a' OR 'rule b'. I have managed to do so with the following piece of code: arcpy....
3
votes
2answers
346 views

Automating Select By Attributes and Calculate Field?

I have zero experience with python and very little experience with ModelBuilder in ArcGIS. I have a shapefile with two fields, let's say their names are "Function" and "Regulation". What I need to do ...
1
vote
0answers
49 views

Creating separate shapefiles for each attribute record using loop in ArcPy? [closed]

Line 24 fixed, final code now updated. Line 22 since fixed , now I get the error Traceback (most recent call last): File "C:\Users\shehn\Documents\ArcGIS\PyScripts\lab6X.py", line 24, in arcpy....
1
vote
1answer
27 views

Using IN Clause to Select By Attributes in ArcPy?

I am working in ArcMap 10.1, trying to write a script to automate the selection of a feature class. I have two input parameters: stop1 = arcpy.GetParameterAsText(0) stop2 = arcpy.GetParameterAsText(1)...
1
vote
1answer
408 views

Using SelectLayerByAttribute with list of values in ArcPy?

I'm fairly new to python, so I'm having a little trouble with this. I want to iterate through a list of values, select the list values from a feature class, select from another feature class that ...
0
votes
1answer
92 views

Select by attribute crashes ArcMap when used with search cursor, but not by itself

I have a script that I want to: run through polygons in a shapefile representing service areas > select each area > then select points from a different layer that fall within that selected polygon. (...
2
votes
1answer
147 views

Selecting polygons which contain majority of area from intersected layer by polygons using QGIS?

I have two polygons layers (a squares grid (blue in image) and a rectangles grid (green in image)). Because the different polygon sizes, different squares overlap with a single rectangle. I need to ...
1
vote
1answer
398 views

“Select features by expression” not matching all results for text field?

I have a vector layer containing all of the property parcels in the county. There is a field called "PROP_TYPE" that contains the type of property. I am trying to select all of the residential ...
0
votes
1answer
81 views

Automating row selection and update of attributes in ArcPy? [closed]

I'm looking for a solution to automate a process I have found myself re-doing manually quite often. I have a dataset that consists of one column named "quarter" that is formatted "2018 Q1" (or Q3, or ...
2
votes
1answer
891 views

Selecting objects based on multiple attributes QGIS

I would like to select objects from the attribute table based on multiple attributes. I want to select all ojects that have 'ja' in the column "BLAUWBORST", all objects that have 'ja' in the column "...
1
vote
0answers
55 views

Is there a better way to use the operator to select a group in an expression in Select by Attribute?

Is there a better method to do a group like in a row or in colum that you want to select from in using the Select by Attribute? I have a point shapefile that I have has photo index. The field has all ...
0
votes
1answer
32 views

Build arcpy query to select features containing one OR another one string value?

I have a table. Based of field name "TYP", I would like to select rows which contains string values "a" or "b". I need to specify the query to my arcpy code. fc = "C:\\Users\\type_jan18.shp" field = "...
1
vote
1answer
389 views

How to make an SQL select query between two field with LIKE operator [closed]

I want to select records by comparing two similar text field in ArcGIS Desktop 10.3 (data stored in an ORACLE ArcSDE database). I'm looking to select all records where field1 contain a string that is ...
4
votes
1answer
125 views

Creating selection in stand-alone ArcPy script?

I am using ArcGIS Desktop 10.5. I have had this work for me before, so I am confused as to what problem I am -running into now. When making a selection to copy to a new dataset in Arcpy, -here is ...
1
vote
0answers
38 views

Pyscripter crashes with EOFError timed out

I am not sure whether someone ran into similar problem. I've been using PyScripter with Arcpy for the past two years and I have been happy with it most of the time. Yesterday I ran into a kind of ...
1
vote
2answers
1k views

Deleting only specific attributes (columns) by name in an attribute table in QGIS with Python

I am attempting to delete select columns for the final output of the attribute table that I'm creating.I'm having trouble with deleting the attributes (columns) that I want, regardless of their index ...
1
vote
2answers
409 views

Any way to clear selections from features in a map only if they have selected features?

While I know the clear selection tool exists in ArcMap, I am looking to produce a script that would only work if all selections are cleared from the start. I have added lines of code to clear ...
1
vote
1answer
194 views

Iterating/looping through Select by Attributes and Export Data? [duplicate]

In ArcMap 10.5.1, I have 2 feature classes in ModelBuilder; both have a common attribute "Well_Nu." The goal is to loop for each record in the first classes's attribute table and do: 1) Select by ...
1
vote
1answer
112 views

Iterative selection by attribute and then location using ArcGIS ModelBuilder?

I am trying to divide and record a road dataset using a GRID I just created. Is there a way to perform that using only the ModelBuilder or do I have to use Python (never tried before..)? Here is ...
1
vote
0answers
36 views

Model Builder - Selections Add Up at the End

I am creating a model so that I can help colleagues visualize the workflow I used on a problem. My task was find all manholes in a specific area that connect to pipes >= 36". Simple enough, I did ...
3
votes
1answer
391 views

arcpy.SelectLayerByAttribute_management fails on Feature Class

I'm trying to streamline contour production with a script tool. Typically we make the contours to bring into AutoCAD Map where we need the "Elevation" and "Layer" fields populated so they import ...
3
votes
2answers
398 views

SQL Condition Statement in Select By Attributes query

I am attempting to execute a Select query in Select By Attributes where the return record set I'm looking for includes all records where the String value is greater than 7 characters long. For ex., I ...
3
votes
1answer
75 views

Select By attribute - top 100 values for each district

I am trying to determine the highest 100 values for each district in a shapefile. I have 27 unique districts and 62834 records, but not sure how to proceed. I could "split by attribute" based on the ...
1
vote
1answer
52 views

Using less parameters for Python script tool?

I am looking to create a user-input script for finding surrounding features of a given point. However, the parameters for it are very sensitive and I would like for it not to have to be such a process ...
-1
votes
1answer
49 views

Select analysis tool is creating an empty feature class in an arcpy stand alone script [closed]

I'm using select analysis to find a specific value. My program is working and I'm not getting any errors. However, the feature class that the program is creating is empty. I've double checked to make ...
1
vote
1answer
95 views

How to select cells with text?

I have point layer with text field. There is many empty field. I want to select only filled text. Something like this, with QGIS:
0
votes
0answers
37 views

Can arcpy let the user enter a query expression for select layer by attribute?

I have written something like this: inFc = sys.argv[1] FLayer = sys.argv[2] FValue = sys.argv[3] arcpy.MakeFeatureLayer_management(inFc, FLayer) #feature layer created arcpy....
0
votes
2answers
109 views

Create and populate field with name of feature (Select by Location) ArcPy

I am staring at 5600 individual points and 60 polygons. I need to create a new field in the point fc called 'Basin Name' and populate the field with the name of the Basin that it lies in. I am trying ...
12
votes
1answer
277 views

Turning off all pulsing-heartbeat and other animated effects in ArcGIS Pro?

Every time I select a feature or edit or split a feature the selection, appears to slowly pulse which is a new visual effect in Pro. The pulse effect takes way too long bordering on annoying which ...