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

learn more… | top users | synonyms

2
votes
2answers
109 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 ...
0
votes
1answer
105 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
1answer
39 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
2answers
216 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 ...
0
votes
1answer
54 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
1answer
132 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 ...
1
vote
2answers
127 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 ...
3
votes
1answer
75 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 ...
0
votes
2answers
126 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
124 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
106 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
28 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
29 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
60 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
47 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
126 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 [...
4
votes
2answers
247 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
38 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
144 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 ...
1
vote
1answer
56 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
2answers
50 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 ...
0
votes
1answer
142 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 ...
-1
votes
2answers
44 views

Selecting parcels with multiple features [closed]

So i have a parcel polygon layer and a house point layer. I want to select parcels that have two or more points in them? Any suggestions?
0
votes
3answers
835 views

How to use Select Layer by Attribute in ArcPy

I want that one variable takes input from the user and then we compare the value to the attribute. val = input("Ask user for something.") arcpy.SelectLayerByAttribute_management("Sample", "...
1
vote
2answers
226 views

Select by Attributes Crashes ArcGIS

I have a feature class that contains 131000 records. One of its fields (which was originally joined from a table) only has three possible values: null, 0, and 1. I have been trying to select the ...
1
vote
2answers
57 views

On line shapefile, how to compare attribute between consecutives edges

I have a line shapefile with speed restriction attribute on each edge. I like to verify differences between two consecutive edges for all shapefile edges. Example: One line has speed restriction set ...
0
votes
0answers
85 views

SQL fails in python. In ArcMap error FDO error: -2147024871 returned

I'm having issues with an SQL expression for a feature class in a file geodatabase. When working in ArcMap, the SQL will fail on its first attempt, and produce the following error: However, when I ...
1
vote
1answer
122 views

Using Select Layer By Attribute in ArcGIS ModelBuilder multiple times?

I want to use Select Layer By Attribute in ArcGIS ModelBuilder multiple times. It works everything fine until a new feature is created (e.g. after Dissolve or Multipart to Singlepart). Then I can't ...
1
vote
1answer
154 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 ...
1
vote
0answers
58 views

Is order of selection in Spatial Data important (attribute, location, graphic)?

When dealing with spatial data in a GIS system, does it matter which way you select the information if you're using all 3 - attribute location and graphical selection? In my experience it seems to not ...
0
votes
1answer
182 views

Select by attributes with user input using Python

I am new to GIS and Python is not my forte, so I am looking for some help. Ideally, what I am trying to do is create a tool that allows the user to select an address from my Address points layer. I ...
1
vote
1answer
273 views

arcpy; Select by attribute with an If, then statement

I am looking for some advice on how to construct an if, then statement based on a select by attribute SQL query or some other method (search cursor?). I am asking users to input a unique ID (arcpy....
2
votes
3answers
328 views

How to use the SQL in select by attribute to select the entries for each values in certain field?

I am trying to use select by attribute for the table in ArcGIS, which is similar to the following picture (lets say): I want to select those entries for each A and B, which have maximum count. I ...
5
votes
2answers
277 views

How can I use boolean value in QGIS style rule?

I'm trying to make a style based on rules, and I want to use a boolean field I have created for that. But I do the following: "field" like 'TRUE' "field" like TRUE "field" like 1 "field" like '1' ...
1
vote
0answers
93 views

How does getLegendGraphic, from GeoServer, handle attribute-based styles?

Suppose I have a layer with a color attribute. Now, I write an SLD with a fill color like this: <sld:PolygonSymbolizer> <sld:Fill> <sld:CssParameter name="fill"> ...
1
vote
1answer
477 views

Using Select by Location and Select by Attributes in single ModelBuilder model?

I'm working on a project involving wind turbines. I'm using ArcMap 10.2 and ModelBuilder to count the number of wind turbines within a 5km buffer zone of a given project (let's call it Project A), and ...
0
votes
1answer
173 views

ArcGIS Select by Attribute SQL syntax problem

I have a list of aprox 150 unique road names in Excel. I copy and paste (as text option) that list into Word (2013 version). I then "replace" all the end paragraphs (^p) with quotes and commas (','). ...
1
vote
1answer
150 views

Why does Select Layer By Attribute give errors 000622 & 000628?

I try to select line segments from a layer "t_Pavement_Line which is open in TOC using the following line: arcpy.SelectLayerByAttribute_management("t_Pavement_Line", "NEW_SELECTION", '"ROAD_CLASS"...
0
votes
1answer
153 views

How to get features “not getting” intersected in arcobjects?

I have two feature classes. I'm intersecting both of them. I have to return features which does not intersect with the other. Lets take an example. I have two feature classes: villages and colleges. I'...
0
votes
0answers
39 views

New value in attribute table for big amount of points

I have got a huge amount of points. I need to change their value according to thier current value. Ex. I have got 4000 points. 1000 with value 7 and 3000 with value 8. I have to select all those 1000 ...
3
votes
1answer
71 views

Problem with arcpy select statement

I have a shp layer with an attribute table. One field has the name Nid and the values are strings (e.g. “0150”, “0420”, “3462” …) Now I want to select the rows in the table that match a given Nid ...
2
votes
1answer
220 views

Using a for loop to execute a query in arcpy

I'm trying to provide the breakdown of fire detection for an area by sorting of confidence levels. The dataset has 12 files (one for each month in a year) with fire records which all have a column ...
3
votes
1answer
441 views

Meaning of empty quotes in select by attribute query?

Can someone please help explain if the empty '' means something? I am wondering if it might be inserted by typo or if you use these empty quotes to locate empty fields within the attributes.
1
vote
1answer
172 views

How do I select all points from a range of dates?

Is there a way to select points from a range of dates to create a new layer? I want to clean up my data by making all points from previous years a separate layer but doing a selection by attributes ...
1
vote
0answers
45 views

Querying on Household Income ranges in a dataset

I've recently been assigned a project to create an ArcGIS database to hold responses from a survey which will be used to perform analysis on the data. One column requires me to enter a dollar-range ...
0
votes
0answers
14 views

Field names change when selecting by attribute/location and then copying feature in model builder [duplicate]

I am trying to create a tool to make my workflow faster for a routine job task. Basically, I have a USGS 7.5 min quad layer and a feature (species) layer, and I want to ultimately create a shapefile (...
0
votes
1answer
451 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
2answers
106 views

How to search by attribute using each row with Python?

I am trying to write a script to select each individual neighborhood using one FC, then use select by location to see the number of lots from another FC that are in the neighborhood and store that ...
2
votes
2answers
176 views

QGIS keyboard shortcut to launch a 'Select by expression' query

I can't find if it is possible to launch a 'Select by expression' query (not to open the dialog) with a keyboard shortcut. I can't find this option in the Settings > Configure shortcuts list... If ...
3
votes
1answer
1k 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()...