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

learn more… | top users | synonyms

28
votes
2answers
1k 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 ...
16
votes
5answers
19k views

Get list of coordinates for points in a layer?

I've got a layer in QGIS that is comprised of points. Its attribute table doesn't have (show) the corresponding x and y coordinates for each point. Is there a way for me to extract a list of ...
9
votes
1answer
603 views

Arcmap Select by Attribute with Python

I would like the following to select (highlight) the "project" layer that intersects the grid, and then pull a record from the selected "Grid". I do not need to save the layer. Note: Running the ...
7
votes
2answers
1k views

selecting by attribute and specific value replace

I want to select all of the features by attribute where the attribue in myattrib is like... Selection "criteria H". That is not a problem. However then I need to replace (myattrib," H", "") except ...
7
votes
2answers
3k views

SELECT TOP query in ArcGIS

Is there a way to use a SELECT TOP (n) within ArcGIS desktop? Is appears that since the ArcGIS query builder is effectively building the SQL statement after the WHERE clause, that this may not be ...
6
votes
2answers
242 views

Breaking apart a polygon layer by unique values, creating many new layers

I have a large dataset of habitat information that I need to calculate distances from animal locations to the closest polygon of each habitat type. The way to do this, that I understand, would be to ...
6
votes
1answer
8k views

How to use Select by Attributes query with semicolons?

I am trying to select multiple (50 or more) unique numeric records using ArcGIS 10's "Select by Attributes" using semicolons ';' after each record which it verifies as good to go. Please see screen ...
6
votes
1answer
2k views

Select all “NULL” values in the attribute table?

I have a quite simple syntax question. I want to select ALL my null values in an attribute table of a feature class, not just the values in a single field. So the question would be: what is the ...
5
votes
1answer
192 views

ogr2ogr selecting features by attributes

I am writing a shapefile after some processing; however, in the final step I need to do some selection by attributes from the the shapefile. I am using the command in a shell with the aim of using it ...
5
votes
1answer
878 views

Querying Data with a 1-Many Relationship Class

I have created a relationship class similar to the one I posted about in this question. Essentially, there is a point feature class representing a location of vegetation clearing with attributes ...
5
votes
2answers
2k views

ArcGIS 10 Field Calculator doesn't notice selection/Attribute Table problem?

I just have an annoying 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 ...
5
votes
2answers
505 views

select by attribute on shapefiles with open-source python modules

I usually use ArcGis 9.3.1, but when running a python script that includes Select_by_attribute (from gp), the script runs very very slowly. Is there a way I can perform a select-by-attribute on a ...
5
votes
2answers
113 views

Select 90% matching attributes

I have a shapefile (.shp) of 180k roads with information of street name. I need to do a Dissolve on that road network to make only one feature per name. But I have a problem by doing that task ...
4
votes
2answers
3k views

How to give multiple colors to features within a single shapefile?

I want to give multiple colors to different features within a shapefile based on attribute values , is this possible in QGIS ? If yes what is the procedure ? Is there a way to provide color by means ...
4
votes
3answers
515 views

Setting defaults in the 'Select By Attribute' SQL editor

Is there a way to set default values in the 'Select By Attribute' SQL editor (the where clause) ? I want to set a permanent value that will appear every time I enter the 'Select by Attribute' window, ...
4
votes
1answer
198 views

Select by attribute

In my shapefile, I have a bunch of features and one field is a integer numerical attribute. I'd like to select all of the features whose value is a multiple of another value. For instance, I have a ...
4
votes
1answer
634 views

Select by attribute expression invalid in python

I'm not sure how my expression is failing. Any ideas? inPoints = "points.shp" i = 0 arcpy.MakeFeatureLayer_management(inPoints, "pts") arcpy.SelectLayerByAttribute_management("pts", "NEW_SELECTION", ...
4
votes
3answers
674 views

Filter by attribute to show only records with whole numbers

Is there a way to show points that only contain whole numbers in a column (eg. 009, 010, 011 and NOT 9,1; 9,2; 9,3...) in ArcGIS 10?
4
votes
1answer
141 views

How to select points within polygon constrained by field?

I've created a polygon from a raster dataset: arcpy.RasterToPolygon_conversion(RasterInt, "C:/arc/poly_int.shp", "NO_SIMPLIFY", "Value") The 'value' field has numbers 1-37, which map to the ID ...
4
votes
1answer
298 views

Selecting the most recent entries from a table in Arc

I have a point shape file that has many event occurances stored for ever point. I am trying to select the most recent event for every point. Is there a way to do this through the "Select by ...
4
votes
4answers
4k views

Automate Select by Location

I have 2 shape files (A and B) each with thousands of polygons. I want to select polygons from A which intersect a specific polygon from B, and save the selected polygons from A as a new shapefile. I ...
4
votes
1answer
140 views

How to print selected features in QGIS?

I have a detailed map in qgis (vector, .shp) and I would like to split the map in four parts based on attributes to print each part of the map separately. Unfortunately, I didn't figure out how to do ...
4
votes
1answer
229 views

Is there a way to select what to import from planet-latest.osm.bz2 to database?

Is there a way to select what to import from planet-latest.osm.bz2 to database? I want to do something like : osm2pgsql ... --place='city' --admin_level='2' My goal is to use only cities and ...
3
votes
3answers
2k views

Make selected polygon a different color without covering everything

Working in ArcGIS 9.3 I'm selecting polygons by attributes and trying to have the selection show up as a light yellow. I set the selection color to the light yellow and it's the 'lowest/last' layer ...
3
votes
3answers
2k 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 ...
3
votes
4answers
7k 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 ...
3
votes
2answers
5k views

How to Extract by Attribute Using ModelBuilder with User Input?

Using ModelBuilder, I want to create a tool that will let a user choose the value or values that will be used to extract a shapefile. I have a parcel layer with a "Parcel_Type" field. I want the user ...
3
votes
2answers
434 views

How to group and count attribute data?

I have a problem with group same data to count it. for example, i want to group same code to one and count them. i can do it when i use MapInfo (Pic 1) but i can't in QGIS. (Pic 2: i can classify ...
3
votes
2answers
325 views

How to Select by Attributes on features sharing common value?

I am attempting to 'select by attributes' a point feature with the lowest numeric value which shares a common value with other point features in another field. For example: I may have 3 point features ...
3
votes
1answer
1k views

Use model builder to select layers by attributes, dissolve them and then merge them

StackExchange team, I would like to reclassify polygons, I want to combine smaller polygons into bigger polygons based on their ID (each polygon has a unique ID). I want to regroup ~800 polygons into ...
3
votes
1answer
89 views

Is it possible to save frequently used expressions in QGIS?

Is there any way to save frequently used expressions in the selection or field calculator dialogs? Obviously I can cut and paste them into a file where I might save them, but I mean within the context ...
3
votes
1answer
92 views

How to select features by matching attributes of two SHPs?

I have one line shape file with lot of road sections and a point shapefile, some of these points are outside my area of interest. The files have one attribute in common and I would like to do ...
3
votes
1answer
166 views

ArcMAP SQL Statement Iterate Feature Selection 'IN' 'BY' 'IS' - escape character

We have a problem when selecting Features from a Feature Class in ArcMAP 10.2 using the Iterate Feature Selection tool in Model builder Our dataset has a Attribute Field with two character codes like ...
3
votes
1answer
443 views

Selecting multiple variables by Attribute from different target layers

I have a model with species point data as a source layer and a number of different shapefiles as target layers. To start I run a search by location tool to determine where the source and target layers ...
2
votes
2answers
661 views

ArcMap 10.1 How to make mass (in bulk) update by attribute value

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. ...
2
votes
2answers
2k views

How to select multiple value in select by attributes in ArcGIS 10

Does anybody can help me with select multiple values from the attribute table? I try this command: "Classes"='14'AND'07' but doesn't work. Thank you.
2
votes
3answers
189 views

SQL expression error for Select Layer By Attribute

arcpy.MakeFeatureLayer_management("N05-12_Station2_JGD.shp","station_12") year=2012 arcpy.SelectLayerByAttribute_management("station_12","#",'"closing">=%d AND "opening"<=%d' % year) ...
2
votes
1answer
268 views

PostgreSQL, find points near points

I'm going to have a database with a 'people' table and a 'shops' table. I'd like to find all people within 500m of a shop, and details from both tables. I'm used to working with mySQL, but I'm ...
2
votes
4answers
2k views

How can you auto-populate field using spatial location of another feature and its attributes?

I want to auto-populate a field based on the spatial location of another feature's attribute. Add a point on top of a building. The point automatically adds the name of the building. This seems like ...
2
votes
1answer
355 views

How to Select polygon feature in ArcMap and pass Selection into Python Addin?

I have a script that uses a arcpy's 'SelectByAttribute' syntax to choose a record in a polygon feature class. Following that, I do a 'SelectbyLocation' to select points from a feature class that lie ...
2
votes
1answer
329 views

Trouble formatting SQL expression for where clause in “Search layer by attribute” arcpy function

I am trying to pass a variable into a where clause in the "Search Layer by Attribute" arcpy function. I cannot seem to figure out the correct format for the SQL expression so that the function reads ...
2
votes
2answers
387 views

Model builder: select feature based on attribute, iterator?

This is the data I have: shapefile with polygons shapefile with line features What I eventually want: line features attributes joined to the polygons that they fall in. I need to clip each polygon ...
2
votes
2answers
253 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 ...
2
votes
2answers
122 views

Trying to use an integer in a WHERE clause

I'm trying to use an integer value in a WHERE clause (looking at an integer field). expression = "'SERVICE' = 'Service' " expression = expression + 'AND ' expression = expression + "'GPS_TIME_TOTAL' ...
2
votes
1answer
158 views

Select and zoom python script

I am attempting to make a simple select and zoom python script for my address points. Currently the script will complete successfully but will not select or zoom to the entered point. I am using two ...
2
votes
2answers
99 views

Save multiple selection sets in QGIS

I'm looking for a feature in QGIS but I am not sure if it exists. I don't know the name of such feature, but I call it multiple selection sets. It exists in TransCAD and I find it very useful. It ...
2
votes
2answers
109 views

Create multiple tables from distinct attribute category values using Model Builder

I've got a shapefile I would like to extract distinct values from an attribute field and have the output as tables based on those values. The shapefile is made of polygons representing parcels and ...
2
votes
2answers
22 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
0answers
52 views

How to move points to another polygon based on attribute?

I have a point layer and a grid cell/fishnet layer. Each point falls within a grid cell. Now I want to move some of the points to another (the nearest) grid cell based on an attribute that exists in ...
2
votes
0answers
180 views

Shapefile From Excel Sheet Crash When Selected Spatialy or By Attributes

Using ArcGIS 10.2, I am receiving an Excel sheet, on a daily basis, which contains 105 columns(Fields) and includes has X and Y values. For whatever reason (which I cannot understand) all data types ...