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
49
votes
7answers
101k views

Getting list of coordinates for points in layer using QGIS?

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 ...
35
votes
12answers
63k views

Exporting feature class into multiple feature classes based on field values using ArcGIS Desktop?

I have a feature class with over 2,000 features, and I need to make them all individual feature classes based on a field. Is there a way to do this?
31
votes
3answers
3k 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 ...
23
votes
3answers
64k views

Assign multiple colors to features within a single vector layer

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 ...
18
votes
5answers
25k views

Selecting contours which heights are integers?

I have a Contours Featureclass, with an interval of 0.2 meters. I wish to select only those Contours, which are at 1 m interval? I have tried using the following syntax in the 'Select by Attribute' ...
17
votes
1answer
11k views

Selecting features by attributes using ogr2ogr?

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 ...
14
votes
3answers
16k views

Selecting features by attribute if in Python list?

I am trying to complete a select by attribute in Python but based on the query of whether an attribute is present in a list. Such a query at its simplest should be something like this: qry = " \"...
13
votes
3answers
16k views

Selecting 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()...
13
votes
7answers
17k views

Selecting by month in date/time field using ArcGIS Desktop?

I would like to select by a specific month from my date/time field in ArcGIS, and just can't seem to find a statement that will work. I have multiple years and multiple days, but want to filter those ...
12
votes
1answer
6k views

SELECT TOP query in ArcGIS Desktop?

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 ...
12
votes
1answer
305 views

Turning off all pulsing-heartbeat and other animated effects in ArcGIS Pro?

Every time I select a feature or edit or split a feature the selection, appears to slowly pulse which is a new visual effect in Pro. The pulse effect takes way too long bordering on annoying which ...
11
votes
2answers
28k views

Extracting 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 ...
11
votes
2answers
607 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 ...
9
votes
2answers
63k views

Selecting multiple values with Select by Attributes in ArcGIS Desktop?

Can anyone help me with selecting multiple values from the attribute table? I tried "Classes"='14'AND'07' but it doesn't work.
9
votes
2answers
9k views

Select layer by attribute using SQL statement LEN() in ArcMap?

I want to query the length of a string column and thought to use: LEN([ColumnName]) > 5 However, that doesn't work at all. I'm querying a table in a fGDB in ArcMap 10.1, hence the notation of [...
9
votes
1answer
22k 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 ...
9
votes
1answer
1k 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 ...
8
votes
4answers
40k 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 ...
8
votes
1answer
8k views

Deleting selected features using PyQGIS?

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

How to select features where attribute is not NULL?

I have an OS AddressBase shape file. One of the attributes is 'paoText'. It is either a text string like 'Anchor House' or is NULL. I want to extract all the records where there is a text string i.e....
8
votes
1answer
15k 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 ...
8
votes
1answer
234 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/...
7
votes
2answers
491 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 ...
7
votes
2answers
3k views

How to select and zoom in features from a QGIS Python Plugin

I'm very new to Python. I'm trying to find a way to select and zoom to the features from a QGIS layer. I've created a plugin and built a custom form. I have 3 values from the form which I need to ...
7
votes
2answers
2k 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 by Attribute within a specific area (using Select by Location?)

I have a map with four layers. Two of these layers cover an entire state, and the other two focus on the area I'm actually interested in within the state. I'm trying to Select by Attribute with one ...
6
votes
2answers
21k views

How to select a multiple field value by expression from the same layer in QGIS?

Using QGIS in the operation 'select by expression' how is the correct expression to select multiple field value? ex. City NAME = ROME and NAPLES (expression is invalid)
6
votes
1answer
5k views

Select By Atribute using python script on .Shp file getting error 000840 value is not raster layer

I have a script that calculating vertices angles on Polyline layer and the selecting features in that layer at a specified angle. at the end of the script i'm using select by attribute and getting ...
6
votes
2answers
2k views

Selecting multiple attributes, greater and less than

I am trying to select by attributes from a polygon shapefile. I need to select areas with a temperature greater than 10 oC and lower than 15oC using gridcode but I can't seem to work out the correct ...
6
votes
1answer
299 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 ...
6
votes
2answers
2k 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 ...
6
votes
1answer
5k 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 ...
6
votes
2answers
389 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 ...
5
votes
2answers
675 views

Selecting all features except one using QGIS?

Using QGIS 2.18. I have 346 polygons on a layer and I want to display all but one. In this instance I wish to run a query using field ONSCode but show all except 17UB. I have been trying to use NOT ...
5
votes
2answers
531 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 ...
5
votes
1answer
808 views

Select by Attribute all features with values that are multiples of 5?

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 ...
5
votes
1answer
3k views

Selection by attribute string with wildcard as part of name in ArcGIS Desktop?

I have an attribute field in my file geodatabase (GDB) where I'm trying to select all records that contain an underbar in the string field. The issue is that the underbar is considered a SQL wildcard ...
5
votes
2answers
3k 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 ...
5
votes
2answers
2k 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", '...
5
votes
1answer
336 views

Display Multiple Symbols for a single point feature by field attribute vale

I want to create a point feature layer and add points. Around the point I'd like to add icons/symbols and labels based on data in fields of an attribute table.
5
votes
1answer
2k views

OGR: How to best use GetFeature on a selection?

I think the following is very confusing sel_str = "ND_14 = '108'" l.SetAttributeFilter(sel_str) l.GetFeatureCount() >>> 1 In a for-loop this gives me for f in l: g = f.GetGeometryRef() ...
5
votes
1answer
4k views

Need to select and delete features in ModelBuilder

I'm new to ModelBuilder and I'm planning to take some class of it, but in the meantime I have a project with a relative easy task. The high-level plan of this project is: Load shapefile into ...
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 ...
5
votes
2answers
1k 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' ...
5
votes
4answers
3k 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?
5
votes
1answer
1k views

Selecting the most recent entries from a table in ArcGIS

I have a point shapefile that has many event occurrences 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 ...
5
votes
2answers
818 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
1answer
1k views

Select duplicate attributes in same shapefile in QGIS

I have this vector layer of lines between 2 nodes. I need to select all second entries that have the same length of the previous one. Can someone help me with this?
5
votes
2answers
5k 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 ...
4
votes
2answers
6k views

Select features using an expression, QGIS

I've a problem when using Select features using an expression. I've an attribute table with many features: It's a shapefile from a previous CSV table. The data are localities for water analysis, where ...

1
2 3 4 5
10