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

learn more… | top users | synonyms

8
votes
2answers
194 views

Select by Attributes - Strings with < 5 characters

I have a column of zip codes which are strings. Most of them are the usual 5 digit zip codes, but some are only 3 digits or missing a digit. (keep in mind, I need this column as strings for other ...
10
votes
4answers
8k views

How do I select only those contours who heights are Integers?

I have a Contours Featureclass, with an interval of 0.2 Meters. I wish to select only those Contours, which are which are at 1 m Interval? I have tried using the following syntax in the 'Select by ...
1
vote
1answer
24 views

Selecting the minimum point in a polygon

I am attempting to find the minimum point value within a polygon using ArcGIS 10.3. I have two datasets: 1) A series of polygons & 2) A series of points scattered about. After selecting a given ...
0
votes
4answers
34 views

Web service with geoprocessing capabilities (i.e. use of select tool)?

We would like to have a published web service with capabilities to allow geoprocessing operations (consume feature data) - select tool (e.g. select by attributes) - on the service when we view/open it ...
0
votes
0answers
36 views

Rasterize layer with GDAL after attribute filtering

I am working with GDAL/OGR and I need to do the following task : I have a shapefile with many attributes. I performed a query over one of them, "type_of_building='Church'". I have done this with the ...
3
votes
1answer
3k views

Selecting by attribute and calculating field of new selection in ModelBuilder?

I have a polygon shapefile (with 4000 records in it) that I want to group into different regions by doing a "select by attribute". I need to do this about 164 times because of the different selection ...
2
votes
2answers
137 views

Dissolve line segments in QGIS if they touch and fall within the same class. (tools or script?)

I have line segments that have the following 3 attributes (Class, start_point, end_point). I would like to merge/dissolve line segments that fall within the same class if they intersect (touch). i.e. ...
1
vote
1answer
33 views

Empty feature classes made when trying to split by attribute

I am working with a Basic license of ArcMap 10.3, and I am trying to split a feature class into multiple feature classes in a geodatabase by unique values of an attribute. More specifically, I have a ...
3
votes
4answers
217 views

Get Parameter as Text and select layer by attribute

I have written a python script tool wherein a user specifies a feature class (e.g., Landuse) containing different attributes (e.g., parcel size, landcover etc.), name of the attribute field from which ...
0
votes
1answer
33 views

ArcGIS Select largest N rows in group

I have feature class (Name: V1) in personal geodatabase with columns: Height [float] and Id [int] representing group number I need to do SQL query that will select eight highest 'Height' values in ...
0
votes
2answers
80 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 ...
5
votes
4answers
18k views

Using String Functions (LEFT, RIGHT, MID) in Select By Attributes against a File Geodatabase using ArcMap 10

I finally (albeit reluctantly) made the switch from a personal geodatabase (pGDB) to a file geodatabse (fGDB) not too long ago. The main reason it took so long to switch has to do with how Select by ...
0
votes
1answer
32 views

Auto-selecting records in all spatial and non-spatial joined/related tables by selecting only “parent” spatial record in ArcGIS for Desktop?

(1) I have a layer of pipes with related spatial and non-spatial data linked via joins and relates. Is there a way of selecting the top/parent record and then having ArcGIS auto-select all related ...
0
votes
1answer
348 views

Error in python code for loop using SearchCursor, selectlayerbyattribute, and copyfeatures tools

I am fairly new to python scripting for ArcGIS. I am trying to create maps where each county is selected and then copied into a new layer with only that county's data. Then, I used ApplySymbologyFrom ...
1
vote
1answer
40 views

How to select attributes by unicode field value?

I have an attribute table in QGIS 2.10 with a string field (myfield) and when I want to make a selection based on the unique values of this field I get no selection at all. >idxmyfield = ...
0
votes
2answers
31 views

Python select by attributes, location, copy features [closed]

Python script is failing. It's supposed to make a selection from a lyer based on attributes value and then select intersecting features of that selection and then make a copy of the selection as a new ...
28
votes
3answers
2k views

Is there a “Select by Attributes” plugin/widget for ArcGIS Server JS API?

I'm hoping to find some existing code which emulates the "Select by Attributes" dialog in ArcMap, within the ArcGIS Server JavaScript API. Writing a hard-coded QueryTask is easy - I'm looking for ...
0
votes
1answer
50 views

Using variable in SelectByAttribute_management [duplicate]

I am new in Python. I was trying to use a variable for selecting a feature instead of giving a direct input. My code sample will explain it better: import arcpy from arcpy import env ...
0
votes
0answers
40 views

How to extract cross pattern in point data based on heading field, automated using ArcPy

I'm trying to automate a process to identify and remove a cross pattern in point data, as seen below: This picture shows the points colored by heading (degrees from North), with the exception of ...
2
votes
2answers
94 views

QGIS Select double feature by attributes

There is this point shapefile in QGIS (2.12). There is one column with the street name and one with the housenumber. Is it possible to select all features that have the same street name and ...
1
vote
2answers
94 views

Python script for select by attribute function for QGIS

The following is of course working, selects these features of my_layer that have attribute 1 for my_field2 and appends the corresponding attributes of my_field1 in my_list: my_layer = ...
0
votes
1answer
81 views

Python code to select streamlines within selected watershed

I'm trying to calculate total stream length for multiple, overlapping watersheds (i.e., each watershed contains the watersheds upstream of it). I have a flowline layer that I've run through the ...
1
vote
2answers
86 views

QGIS Tool Scripting Help with “Select by attribute”

** I've gone back and edited (shortened and focused) my own question QUESTION: Why am I getting the error message "The following layers were not correctly generated: Output", when writing a script ...
0
votes
1answer
45 views

Copying Multiple Selections (by Attribute) to One Output Shapefile using QGIS Python scripting?

INTRODUCTION The code below makes a selection and then saves to an 'Output' file (shapefile?) each time through the "FINAL ITERATION LOOP". Each 'Output' file will contain all selected civic address ...
3
votes
2answers
107 views

subquery in select by attribute in Arcgis

I have a table with several fields. field A contains the same kind of values as does field B. I tried to select all points where the value in field A does not exist in anywhere field B using query ...
3
votes
1answer
77 views

How can I select all streams downstream of a polygon

I have an ordered stream network and I want to select all stream features that contain water that has come from a certain area. To start with I'm running a select by location query to find all stream ...
3
votes
1answer
45 views

In ArcGIS 10.x, how do I select features of a point shapefile whose z values are above or below the elevations in a DEM?

I have a multi-point shapefile representing earthquake hypocenters (containing depth values) and I have a DEM raster representing an underground surface (the top of the PreCambrian basement). I want ...
1
vote
2answers
1k views

QGIS Advanced String Filter Expression returns too many results

"GNR" is a string column and I expect the filter expression "GNR"='.11' to only return the feature with the value '0.11'. Why are the other features with values of '.110'and '.1100' included? Is ...
0
votes
2answers
92 views

How to use Select by attributes more efficiently

I made a shapefile into 1,040,000 grids by the tool, create fishnet. This shapefile has an attribute table including 7 fields and 1,040,000 rows. What I want to do is to make a model which can let me ...
0
votes
1answer
77 views

Debugging syntax error (invalid syntax) from arcpy.SelectLayerByAttribute_management()?

I'm writing a script that will create a list of values from the field "Year_" using search cursor, and then a set() of unique values from the list. I then want to iterate through the set making a main ...
1
vote
1answer
95 views

Select by attributes is not selecting correctly

I have an attribute table where 2 columns have values in common. What I need is to Select by attributes the rows that have the same values, for this I'm doing: "w_min"= "MIN_W_MIN" AND "MIN_W_MIN" ...
0
votes
1answer
23 views

Error: 000358 Failed to execute (SelectLayerByAttribute) halfway through the script

Its strange that the script would start and work on some data, but then fails more than half way through. Here is the error message and relevant script (error line 229 in bold) line 229, ...
0
votes
0answers
25 views

Finding and labeling intersections between polygons on a shapefile

I have two shapefiles-- one is labeled islands, the other is unlabeled parcels of land on some of the islands. My issue is that I need to label the islands that have parcels of land. My instinct is to ...
0
votes
1answer
52 views

How to assign a new name for values selected from two columns?

I'd like to assign a new name (either HIGH, MEDIUM or LOW) to values selected from different columns in ArcMap 10.3 I selected the two values from the two columns ("MAIN_ROCK" and "SUB_ROCKS") using ...
1
vote
1answer
42 views

How to select different values from two columns through Select By Attributes?

I'm using ArcMap 10.3. I'm trying to select by attributes different values from two columns. I want to define the areas where Main rock is GRAVEL And Sub-rocks are : a. mudstone tephra loess b- ...
2
votes
1answer
75 views

Using Search Cursor to calculate fields with records having a specific value

I'm a total beginner at programming and Python. I'm trying to select features by attributes and then field calculate in another field. In VBA it might look like this: If [Z1COMM] = "R" then ...
1
vote
1answer
784 views

What is correct Where Clause when using variable and Select By Attribute tool within loop?

I have seen several similar posts related to this technique but I am still having issues. The following script is intended to select all points from one shapefile that are within the boundaries of a ...
2
votes
1answer
283 views

ArcPy inconsistently accepts SQL queries for MakeFeatureLayer or SelectLayerByAttribute

I need to buffer a subset of features in a particular feature class. To do this, I am first creating a feature layer (using a SQL query to select only what I want), and then running Buffer. So my ...
1
vote
1answer
128 views

Reference Selection in SQL query (where clause)

I keep raising errors with my where_clause in the 9th line of this script. FID is an Object ID field and I want the cursor to select whatever row it is currently pointing at. I don't know how to do ...
4
votes
2answers
128 views

Select for a specific number of characters

I am using ArcGIS 10.3.1 and have an attribute that has either 4 or 5 characters; i.e., CO-1, BY-3, CAR-1, MRT-8. All letters are uppercase, this is in a personal GDB, and this is a string field. I ...
0
votes
1answer
34 views

“select by attribute” error, when using getParameter

I'm developing an ArcGIS tool by Python. Below is a part of the inputs: StudyArea = arcpy.GetParameterAsText(0) LandCover = arcpy.GetParameterAsText(1) gridcode = arcpy.GetParameterAsText(2) ...
2
votes
4answers
130 views

Select polygons one by one and export them using arcpy

I have a shapefile that contains 200+ metropolitan cities. In each city, there are some tract polygons. The dbf table looks like: tract city xvar 1 0040 20 2 0040 12 3 0040 ...
4
votes
2answers
3k views

Field Calculator does not notice selection? [closed]

I have a problem with the Field Calculator in ArcGIS 10. I selected specific points of a Shapefile I want to calculate, but FC is always calculating all fields. Unfortunately there is no checkbox in ...
3
votes
2answers
937 views

Selection subquery using another table in database ArcGIS

I need to 'extract' a list of variables based on the IDs from another table. Using a subquery seems to be the best method. I have a large list of variables and have outside calculated a second list. ...
2
votes
2answers
2k views

Making mass/bulk update by attribute value in ArcGIS Desktop?

I have feature class with 70,000+ records (file geodatabase). I want to make in bulk update on an attribute where the value is NULL. Select by attribute shows that I have 5,000 records like that. ...
3
votes
1answer
1k views

How to delete selected features in Qgis using Python

I have a shape file with only one field DN. I would like to delete all features which does not have specific value of the field. Let say the DN can be 1,2 or 3. So far I was able to find out how to ...
2
votes
2answers
702 views

Why cant I use SelectLayerByAttribute_management while a cursor is set

I've been having a problem with arcpy in that the simple line: arcpy.SelectLayerByAttribute_management ("TEMP_LINES") produces this response: Runtime error : ERROR 000358: Invalid expression Failed ...
0
votes
2answers
44 views

SyntaxError with cursor and Feature Selection in ArcPy?

I tried to select each feature in the layer "temp" and use the selected feature to select features in the other layer "Railway" based on location and then do some calculations with the "Railway" layer ...
1
vote
1answer
45 views

automated selection by attributes and location within another Layer

I have two Polygon Layers. Layer A are Districts of a City and Layer B are Blocks of a City. Currently i'm working with QGIS 2.6.1 and i don't have access to any other GIS. What i'm trying to do is: ...
0
votes
1answer
92 views

Referencing CSV file in Select By Attributes SQL query?

I have 2 databases: Database 1: Point Shapefile with adress and APN (parcel numbers) as attributes. (Huge number of points, addresses for an entire metropolitan area). Database 2: CSV file with a ...