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
1
vote
1answer
2k views

A column was specified that does not exist - Error when running Select Layer By Attribute tool

I have shapefiles in a folder that were created by using the Raster to Polygon tool to convert reclassified rasters to polygon shapefiles. Each has a field named 'GRIDCODE'. I now want to select ...
1
vote
0answers
42 views

Select by location from multiple files and extract to shp with ModelBuilder?

I need to select data by location from multiple files and then to extract to separate shapefiles. I tried to implement this process using ModelBuilder through workspace iterator. However, the tool "...
1
vote
2answers
200 views

Variable in where clause arcpy.Select

I'm trying to set up a loop that includes using items in the array along with string text to populate the where clause. I'm getting the invalid sql expression for the clause. Here's what I have so ...
1
vote
2answers
171 views

Batch Select Analysis and Clip Analysis

Basically I want to run a select analysis on each individual row in a shapefile, then output unique shapefiles. After, I want to use each shapefile that's been output and stored to clip one particular ...
8
votes
1answer
212 views

Accessing QGIS map canvas as a variable for expressions

Is it possible to access the QGIS Map Canvas as a variable or expression value to be used in the field calculator or labelling engine? (i.e. so that you can create an expression that selects/...
1
vote
1answer
638 views

Add-In Combo Box: populate with specific field's values and pass selection to select by attribute

I checked Passing Selection from Combo Box into Definition Query using Python AddIn?, but I am still stuck on code/syntax. I created a simple add-in with a button that clips and exports tax parcels ...
2
votes
1answer
89 views

How to use a list of numbers from a spreadsheet.csv field in the query of arcpy.Select_analysis

Have an excel spreadsheet in CSV format with a field of APN numbers (8 digit US assessor parcel numbers) Need to query these in a large layer of parcel polygons using python script and the arcpy....
1
vote
2answers
224 views

SelectLayerByAttribute() got an unexpected keyword argument

I am trying to update a field with a new value as I updated a Domain for a web purpose. I am new to this. I want be able to choose the layer and then the field to update M=Municipal S=State C=...
3
votes
3answers
673 views

Using arcpy.SelectLayerByAttribute_management?

I have difficulty to understand how to use "arcpy.SelectLayerByAttribute_management". I not understand how to write a query. I want to select the records > 0. I am attaching my code: import os,...
0
votes
2answers
2k views

How to select features with same values?

How can I select all those features that has exact same values in their attribute field called "X"? I think that the solution could be something like the Countif function in Excel, but I haven't found ...
3
votes
4answers
417 views

Selecting Maximum value for each unique ID

So i have a table (linked below) and for each unique PropertyID, i need to find the highest percentage value and extract that to a different table. I need to retain all the other attribute information ...
1
vote
1answer
154 views

Debugging ArcPy ERROR 000358: Invalid expression?

I've tried several iterations of this SQL statement in a stand alone script: QF5 = "Week" QF6 = "Wk" RV3 = "" WC4 = """" {} <> {} AND {} <> '{}' """.format(QF5,QF6,QF6, ...
5
votes
2answers
459 views

Select by Attributes not selecting ALL larger numbers greater than 75000 in ArcMap?

I was trying to select all values over 75000 in Select by Attributes. Surely I thought doing so would do just that, but it's essentially selecting only values that begin with 75 and 8 and 9 (even ...
1
vote
1answer
206 views

Testing uppercase vs lowercase field values on the fly using ArcPy & Python?

I am trying to use the code below to allow testing of one field which contains mixed case against another field which contains uppercase only. I have read many many posts but they generally tend to ...
1
vote
2answers
80 views

Error 000358 with SelectLayerByAttribute_managment

I get this error when 'arcpy.SelectLayerByAttribute_management' statement is executed. I tried many different ways to format my whereclause. I had printed it and it looks fine. But the error still ...
1
vote
2answers
796 views

Selecting certain fields in layer using ArcPy?

I have a layer in geodatabase, and I want to use SelectLayerByAttribute to select certain fields in this layer. Then, use CopyFeature to output those fields to a new shapefile. for example: layer =...
2
votes
2answers
103 views

Using Python in the Field Calculator to select more than one data point

I assume this is a basic Python coding question, but I have scoured the internet and spent several hours trying on my own. I have about 2000 cells in my FID_1_1 column that I need to select and code ...
3
votes
1answer
77 views

Extracting values starting at certain point using ArcGIS for Desktop?

I have a '2015 Temp' shapefile that tells me the temp_min and temp_max for the entire year at one site. I want to make a new file from this where I have the day where temp_min fell above 40 degrees ...
0
votes
1answer
37 views

Create a way to easily select by attributes for a complicated union file [closed]

I have polygon feature class created from a union of 3 other feature classes. These are 5 ownership types, 3 classes of slope % and a multi-ring (3 distances; 50,75 and 100) road buffer. So any ...
2
votes
1answer
2k views

Loop through Features in a Layer with ArcPy

I am trying to loop through a list of features in a layer to: select a feature select all features adjacent to that feature export the selection as a new table, then convert it to an excel file. ...
1
vote
1answer
73 views

Detecting changes between two shapefiles on basis of attributes as well as spatial location in single query?

In MapInfo we can easily compare two files on the basis of sql query where map info works on rows. You need to update only latitude and longitude and create points on the basis of lat/longs in both ...
2
votes
1answer
46 views

Relating a table to a point layers and exporting results in model builder?

Here are the data that I'm working with: Table: Standalone table from an OLE DB connection with a MS Access db 10,800 records with non-distinct account IDs Divided into 300 different categories ...
1
vote
0answers
108 views

Pass list parameter to SQL expression [closed]

I am trying to pass the results of a list as a parameter in a SelectLayerByAttribute expression to output and excel spreadsheet of the attribute table. Here is the code, the results create an empty ...
1
vote
1answer
2k views

How do I Cluster by an Attrbute?

I'm making a Leaflet map, and using the Marker Cluster plugin to cluster a Few Thousand Markers. On of the attributes in my Data is the State that this marker lies in. I would like that at the ...
0
votes
2answers
61 views

SQL expression for largest number in Table

With "select by attributes" I would like to select the largest number in a column of an attribute table. How would be the SQL expression for that? I don't want to select it by hand, because I will ...
1
vote
1answer
190 views

String value as a number in modelbuilder

I have got a drop-down list of values in my model. There are word combinations that do not exist in my table. One of the tools in my model should select string data of a field by number of characters ...
3
votes
1answer
712 views

Using arcpy dictionaries to select attributes from a different layer

I'd like to incorporate the use of dictionaries to access data between tables. So far I have been able to create the dictionaries that I need from my feature class fields. I have one dictionary that ...
0
votes
2answers
109 views

Arcpy select more than one record

I'm working with ArcGIS 10.2. I used this code to select one record of an attribute table: import arcpy # Set the workspace env.workspace = "F:ArcGIS\Trab\Model\Lin_150_tr.shp" # Make a layer from ...
1
vote
0answers
102 views

Identifying rasters with specific attribute value that intersect polygon using ArcGIS for Desktop?

I have numerous raster files that each contain an attribute field "VALUE" that can take on the values 0 or 1. How can I identify rasters that have any of their "VALUE=1" cells intersecting a focal ...
1
vote
2answers
96 views

Selecting by attribute using input file name in for loop

I have a set of feature classes with naming convention: abcde_xxxxxxx_abcde. I also have a shapefile, Mapsheet, with the field "MS" populated with values xxxxxxx. I would like to loop through the ...
0
votes
1answer
143 views

Using select by attribute query?

Using Arc Desktop 10.3.1 I have a datetime field that is in the format of MM/DD/YY HH:MM:SS Some of the records have a only a date and some have both a time and a date. I want to strip off the time ...
-1
votes
1answer
52 views

how do I select records from a layer that do NOT have features from another layer within them? [closed]

I'm trying to find vacant land in my city. I have a layer with buildings and a layer of parcels. I want to create a layer of the parcels that do not have buildings within them. I have tried select by ...
1
vote
2answers
95 views

Select by attributes alternative [closed]

I have a huge list of parcel data that I need to assign land use values. The criteria is such that if more than one land use type overlays a parcel, then I need to assign the parcel with the land use ...
0
votes
1answer
389 views

Selecting rows where values of two columns are same in ArcGIS for Desktop?

I would to have your guidance on a type of data selection in ArcGIS. I would like to select the rows of a feature "where the values of two columns are the same". as a standard approach there is no ...
1
vote
1answer
60 views

SelectLayerByAttribute not renwing before CopyFeatures

I'm using ArcMap 10.2 and want a python script to loop through a list to make new feature classes, using the list items as attribute values in a selection before copying the features to a new file. ...
1
vote
1answer
403 views

Arcgis select by attribute the day of the week in date field

I am trying to select a specific day in the "Select by attributes" tool. I know you can select using a day from 0-31 like this: EXTRACT(DAY FROM "TimeStampStart") = 5 But I was wondering is there a ...
1
vote
1answer
343 views

How to select multiple values and attributes ie block and lots

Is there a way to select multiple polygons that have a value for the Block attribute and a value for the lot attribute. An example is BLOCK = '100' AND LOT = '1' plus BLOCK = '103' AND LOT = '9' plus ...
3
votes
1answer
3k views

QGIS Filter layer by expression [closed]

Can I make the filter by the value that is obtained by the function? for feature in iter: name_dot = feature['name'] print name_dot expr = QgsExpression("\"name\"=name_dot") selection= layer....
1
vote
0answers
540 views

Random Selection using Select By Attributes tool in ArcMap? [closed]

How I can make a SQL syntax to generate "RANDOM SELECTION" in Select by attributes tool in ArcMap?. E.g. We have two kind of sample: Quantitative an Qualitative data. Quantitative (seven cases): 1,...
0
votes
1answer
207 views

ArcMap highlight features from code

I have a shapefile of lines containing an amount n of elements. I exported these features and analyzed them with another program (Matlab), which provided me as an output a row vector of length n ...
1
vote
1answer
98 views

Sum habitat type within region using MapInfo?

I have two layers; one shows admin regions and the other shows habitats within those regions with columns for specific attributes and the corresponding area in hectares. I need to work out the total ...
3
votes
1answer
202 views

select living-end-streets from a local osm-road-extract with QGIS

I am looking for a method or query to select living-end-streets from a local osm-road-extract. Living-end-streets are dead-end-streets for cars but cyclists and pedestrians can continue on their way. ...
0
votes
2answers
223 views

Arcpy Select by attributes IN operator with Tuple

I have two layers 1. Buffer zones with a string ID 2. the same buffer zones with the String ID plus an extra field call it zone B *this process is taking place within a loop already, just to give ...
1
vote
0answers
75 views

Checking for the presence of a particular field in ModelBuilder [closed]

The model that I'm now building in ModelBuilder will take as an input a certain feature class that may, or may not, have a certain field. I would like the model to check for the presence of that field ...
2
votes
1answer
587 views

Using function to query text field in ArcGIS Select By Attributes?

I can do this: And get result: On the other hand, when I do this: I get an error message: Why query using function is working on numeric field and is not working on text in both shapefile and file ...
3
votes
1answer
1k views

Why does the Select by expression dialog not show field values?

I haven't found a similar question that already has an answer so I hope I can get one... Please forgive me if the answer is obvious. I'm using QGIS version 2.14.0-Essen on my macbook pro with OSX ...
5
votes
1answer
1k views

Select every other n rows in ArcGIS for Desktop?

I am trying to select n rows then skip n rows and then select the next n rows until the completion of all rows in a feature class in a file-geodatabase. Below is an example where n =3: Select Select ...
1
vote
1answer
62 views

How to Select polygons within a feature based on rules applied to FID

I want to select all the polygons of a vector grid which have a FID multiple of N (e.g. N=5). Is that possible?
2
votes
1answer
1k views

QGIS: How to modify the appearence of selected attributes [duplicate]

I am using QGIS version 2.14.1 (Essen). When I open the attributes table of a layer, I select some data which is then highlighted in yellow on the map. I was wondering if it is possible to change the ...
3
votes
1answer
112 views

Performing selection on Attribute and Location of two different feature classes using ArcGIS for Desktop?

I have a point FC and a Polygon FC. Both FC have the attribute VILLAGE. The point with Village = 1500 should be completely within the Polygon with Village = 1500. How can I make a selection not only ...