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
2answers
63 views

Automate saving features by results of join attributes by location

In QGIS v3.8.3 I have one shapefile of all US Census Tracts and another of ~1,000 US Counties. There are multiple tracts in a county. So I did a many-to-one join in Join attributes by location to add ...
0
votes
1answer
27 views

Select evenly distirbuted points of unevenly distributed set

I have a task which looks pretty nontrivial yet pretty standard. Let's say, I have a set of points, unevenly distributed on the map (i.e. in some regions there are a lot of points, while in the ...
1
vote
1answer
25 views

Select ArcMap attributes that are in CSV

Is there an ArcMap 10.1 method for selecting only attribute rows that have an identifier in common with those in a CSV sheet? I exported an attribute table (5000 rows) and eliminated all but the ...
1
vote
2answers
46 views

ArcPy Select Layer by Attribute for Date and Time

I have a list of trips with a field, "Trip Start Timestamp" thats type is date where it appears on the attribute table as M/D/YYYY HH:MM:SS AM/PM I need group all trips with the same trip start ...
0
votes
0answers
20 views

Selecting lowest values in from attribute table in ModelBuilder? [duplicate]

I am trying to select the lowest value from an attribute table within model builder. I have used the Sort tool to sort the values in ascending order but when I add the Select tool and go to enter an ...
3
votes
1answer
103 views

Selecting features using attributes of another file in QGIS

I have a table of attributes in which a field contains combinations of IDs from another shapefile (ex. '[6, 4]' where 6 and 4 are each individual IDs in my shapefile). Here's an example for ...
1
vote
0answers
29 views

I have polygon contain two lines; I want to select and delete the smallest shape length line

I have polygon contain two lines. I want to select and delete the smallest shape length line. Or clip the largest line length. Can't do it manually so I need a model idea or something.
-1
votes
1answer
31 views

Remove selected rows in Geodatabase [closed]

Attempting to delete selected records in a geodatabase. The issue is this geodatabase feature classes stay the same on a weekly basis but the top level geodatabase name changes. My questions are: ...
6
votes
1answer
276 views

Extracting features with equal field value using graphical modeler of QGIS

Is it possible to automate the following procedure with graphical modeler in qgis 3.4 or is it easier to perform such action with a python script using PyQGIS? Identify a feature (a line) in a vector ...
0
votes
0answers
24 views

Select By Attribute: If-Then VB Statement

I am attempting to write an If-Then Statement where if all the UtilityBillingMerge101719.() are true then return all of the results that are true that have an account number. This currently works, ...
0
votes
1answer
52 views

Iterating through geodatabase and assigning field value based on spatial location using ArcPy

This is very similar to Python script to iterate through geodatabase and assign field value based on spatial location and Assigning field value based on location without join just different data. ...
3
votes
1answer
87 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 ...
2
votes
2answers
105 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
56 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
23 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
34 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
36 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
32 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
1answer
12 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
0answers
21 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
31 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
0answers
34 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
41 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
30 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....
0
votes
1answer
37 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
39 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
0answers
30 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 ...
0
votes
2answers
44 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
43 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
94 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
26 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
31 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
99 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
49 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
205 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
36 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
49 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
77 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
32 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
106 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
67 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
37 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
42 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
39 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
43 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
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 ...
4
votes
1answer
554 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
46 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 ...