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
23 views

Select by attribute on shapefile works when added to ToC but not when pointing to workspace

I'm trying to build a script that uses select by attribute and select by location to do some operations on a couple of shapefiles containing a large amount of points and polygons. Preferably, I want ...
2
votes
0answers
27 views

Selecting by location AND attribute using one query

I am using ArcMap 10.8 and ArcGIS Pro 2.7 I have two feature classes: one containing currently uploaded county address points (cad_n) and the other containing updated county address points (d_n). A ...
8
votes
2answers
127 views

Exporting features when column value between specific percentiles

I want to do a statistical analysis. I need to export some features. Their column value between 10%-90% (or 20%-80%) percentile in order to avoid outliers' effect. I can't find a function in the ...
3
votes
1answer
35 views

In QGIS, how do I select by attributes on features sharing common value?

I have a point vector with features sharing non-unique IDs. Each feature also has a "distance" field. I want to select among each set of features sharing the same ID only the feature with ...
3
votes
1answer
99 views

Select features from the attributes table without opening it in QGIS

I have an attribute table with a vast amount of data in QGIS. I need to export only some of the features. Is there any way to select features without opening the attributes table?
4
votes
1answer
46 views

Avoid features to be automatically selected in table

In the screenshot below you will notice that in "Feature", a country has gotten automatically selected. I don't understand why. I have not selected any part of the data or the map. I don't ...
2
votes
1answer
65 views

QGIS Model Designer - Select by Attribute with Multiple Field Parameters

I am building a model that includes a 'select by attribute' algorithm, and I am attempting to select by multiple fields where the value matches a model input. Essentially, I want the selection query ...
1
vote
1answer
26 views

ArcPy: Selecting feature class by attribute then copy selection to new feature class [duplicate]

Using ArcPy I want to make to do a selection on a feature class by field to select everything 0.1 or greater, then copy the selection to a new feature class. However, the output of my following code ...
2
votes
1answer
55 views

Select duplicates records except one

I'd like to know how to select duplicates records except one, with the "select by attribute". I've attached a picture to explain better the output needed.
1
vote
6answers
46 views

List of ID's of all selected features as default-value

I would like to get a array with id's of all selected features of layer 'LayerB' (field-name: "id_of_layerB") as a default-value in a qgis-attribute-form of 'LayerA'. I tried something like ...
2
votes
1answer
68 views

Problem selecting features with % operator

I am having problem to select contours with the following expression: "ELEV" % 0.05=0 As I understand this should select any contour that the remainder of the division by .05 is 0. For ...
0
votes
2answers
31 views

Keep only certain points on a layer

I'm using QGIS 3.10.4. I have a vector layer that contains more than 200 cities as multiple points on the layer. The attribute table has one column: city name. My goal is to keep only 10 certain ...
2
votes
1answer
47 views

QgsExpression cannot get expected result when there is “\” in the string

I hope to use QgsFeatureRequest(QgsExpression) to get desired features. The statement in QgsExpression is: expr = QgsFeatureRequest(QgsExpression("\"planid\" in (48757) AND spi like '0\\...
1
vote
1answer
27 views

Selecting features by characters contained in a text string

Is there a way to select the features of a map by finding text within an attribute table? For example, if several features are listed as "Nature preserve" under a column called "...
0
votes
0answers
53 views

ArcMap: error when selecting attribute records

At 10.8.1 I need to select all records from a shapefile string attribute field where the left-most character is blank (that is, a single whitespace). For guidance, I rely on the onboard ESRI Help ...
3
votes
1answer
51 views

Selecting multiple rows in feature based on contents of list using PyQGIS

I am trying to select rows in a feature layer in QGIS based on the values in a list. I am using PyQGIS in the python console If I just specify one item to find in a column called "gps_code", ...
4
votes
1answer
113 views

Processing tool to invert/switch selection in Graphical Modeler

I want to switch/invert a selection in Graphical Modeler so I'm looking for a processing tool to do so. In ArcGIS, this can be done with "Select Layer By Attribute" with Selection type: ...
1
vote
1answer
28 views

Query Result message returns 0 rows but browser shows results

I am using the Layer filter tools in QGIS version 3.14.1 Pi. (Right Click on layer > Filter) The source data is a Mapinfo .tab-file on a Server. When I put in my filter query, "Field_name"...
0
votes
0answers
19 views

When I export a layer with a definition query, it does not maintain coverage. Why is that and how can I find a way to make it do that?

I am trying to use the NHD waterbody layer in my map. As is, it is a really dense dataset, so I am narrowing it down to only show lakes (Ftype = 390). When I use the definition query, everything looks ...
0
votes
0answers
15 views

Selecting points on surface using ArcScene

I have a 3D surface and tons of points, and I want to only select points on the surface. How can I select these points?
0
votes
0answers
21 views

Using select by attributes then doing spatial join on selection in ArcPy?

I am using ArcMap 10.6. How can I write the code to run spatial join on each match between Layer A and Layer B? First step is to select 1st value in Layer A field (GUID) and select matching records in ...
3
votes
1answer
35 views

Selecting in expression features with line break

I'm trying to filter features in a QGIS layer to those with the following in their "description" attribute. <td>CC_W</td> <td>3</td> I think what I need is ...
0
votes
1answer
37 views

Selecting attributes that contain “%”-symbol in Field Calculator

I have a Text field and it contains values that have a "%"-symbol and "°"-symbol. Example: 1.2% 3.2° 2.3% -1.2° I don't know how to select just the values that have the "%&...
2
votes
1answer
74 views

Selecting two or more values (like two city names) in one column

In the attribute table I have a column with many cities and want to select rows that only contain these city names, like "Paris" and "London". I tried: "cityname" ILIKE '...
0
votes
0answers
32 views

ArcPy ExtractValuesToPoints from raster with select by attribute

I'm trying to extract values from different rasters to a selection of points. So I try to iterate through each raster and for each extract the values and join, append them to a set of points, which ...
0
votes
0answers
9 views

Click a polygon and have associated points be displayed

I am mapping farms with the turnouts that deliver water to the fields. The farms (polygons) are parcels with a text field with 1-4 turnouts. Example- 2478,2479,4910,4911. The turnouts (points) have a ...
1
vote
0answers
54 views

How can I made requests (QgsFeatureRequest) or selections (selectByExpression) from a list of QgsFeature?

I've got a processing algorithm that does a request to select some features that correspond to the incorrect filling of the attributes. It reads a JSON file containing a description of expression (...
1
vote
0answers
29 views

SQL for Select By Attribute to only select Feature Class Polygons based on values from a Table

I have a polygon feature class with one of the attributes being Parcel ID Numbers (Parcels_in_City). I have a table with only Parcel ID Numbers (Parcels_with_Trees). Is there a SQL query that can be ...
0
votes
2answers
23 views

Selecting features from partial string in where clause with variable of Select Layer By Attribute in ArcPy

I am new to coding using ArcPy. My code is: roadname = "Ly Thuong Kiet" arcpy.SelectLayerByAttribute_management("inLayer_lyr","NEW_SELECTION",""" "...
-1
votes
2answers
50 views

Creating selection from selection in attribute table?

Is it possible to repeat a selection in a QGIS 3.10 attribute table so that it is a selection from the selection (i.e., a subset of the original selection)?
2
votes
0answers
51 views

Clip feature (with selected attributes) with individual polygons using iterator: name error or repetitive selection

I have a bunch of locations (polygons) across the USA that I will use to clip a number of features and rasters (e.g., the National Hydrography Dataset). When I clip a dataset like the NHD with all of ...
0
votes
1answer
21 views

Selecting feature (point) based on specific attribute value(s) of another layer using ArcGIS Pro

How do i select a feature (point) based on a specific attribute value(s) of another layer? Scenario: One layer (map) polygons representing disease risk across a continent, with several columns ...
1
vote
1answer
49 views

Create new shapefile for each unique attribute using for-loop with PyQGIS?

I have a roads shapefile. In its name field, I'll create a new shapefile per attribute. I already got each unique attribute under name. The for-loop that iterates over the unique attributes and ...
1
vote
0answers
11 views

Selecting by coordinates in ArcGIS Pro

Using ArcGIS Pro 2.5.0 I've established a grid of points from a raster using the 'Raster to Point' tool and added the X and Y coordinates with 'Add Geometry Attributes'. I now need to select a subset ...
1
vote
1answer
32 views

FeatureClass error message when running ArcGIS Python tool

I am trying to remove rows from a feature class that is included in a python tool in ArcGIS 10.7. I have run the code as an independent Python script and it runs fine, but when I run the following ...
2
votes
1answer
31 views

Exported shapefile from selected features via PyQGIS is blank

I'm doing Open Source Options' tutorial on the topic but my code doesn't work. I guess the selectByExpression() works but writeAsVectorFormat() doesn't. This is my code layers = QgsProject.instance()....
1
vote
2answers
60 views

Selecting only values that occur more than once in a field

I have a field that contains different values, some which occur more than once in the field. How do I select only the values that occur more than once? Example I only want to select rows that contain ...
0
votes
0answers
37 views

Highlight all countries a person has visited

I am interested if it is possible to select a Person in the Attribute table and directly see which coutries are affected by highlighting them. Example: (Here Person 07 is selected and the countries ...
1
vote
1answer
26 views

Displaying only selected records on map

How to make selected records display on the map only? So far, I've selected by attributes and created the clause for the records I needed. These records are highlighted on the map but also the other ...
1
vote
1answer
122 views

Changing symbology of a single selected polygon feature instead of the entire feature class value

Using ArcGIS 10.7 I am editing a polygon layer, which I set to transparent so that I can make my edits according to a raster template underneath. With the amount of edits I am doing I would like to ...
0
votes
0answers
26 views

Using multiple selection queries to calculate fields in ArcMap ModelBuilder

I am trying to calculate two fields based on a combination of select by attribute and select by location in model builder for road center lines. In my current model I have it set up so that I ...
0
votes
1answer
52 views

Selecting polygons based on area of overlap in QGIS?

I am working with point data in QGIS, where the points represent electricity pylons on a transmission grid. I have created buffers with a 1 km radius around each of the points, and I would like to ...
1
vote
1answer
24 views

Distinguish between point and any other spatial type

When running an ST_INTERSECTION query on two linestrings in PostGIS, I expect it to return a point (e.g. 'POINT(1 2)'). This works 99,99 % of the time. However, sometimes (for whatever reason), my ...
3
votes
2answers
210 views

Selecting more features with “ILIKE” and “IN” operators using QGIS

I would like to select more features with expression in a specific field, which contains the name of the attribute (IN operator is useful). Moreover, the name could not be exact, so the ILIKE operator ...
0
votes
1answer
31 views

Expression for “SelectLayerByAttribute_management” with value of a cursor in the field name?

Within a script I create a new file, which has a dynamic value in the attribute name. This also changes the name of the attribute [FID] in each file. During a query in a file I have to use this ...
1
vote
1answer
30 views

arcpy SelectByAttribute_management

I try to add a point xy to feature class and I want to select the latest record in table (recently added). The script runs and I don't have any error message but the tool doesn't select any thing. How ...
0
votes
0answers
23 views

expression for “SelectLayerByAttribute_management” with value of a cursor

I am currently struggling with the correct syntax for a SelectLayerByAttribute_management query, which is created iteratively by a cursor. I want to intersect each municipality from a polygon file ...
1
vote
0answers
13 views

select layer by area of overlap with another polygon

I am working in ArcGIS Pro. I have a polygon (chartreuse) with a fishnet grid laid over it (burnt sienna). I would like to select those polygons from the burnt sienna fishnet whose areas are greater ...
2
votes
1answer
25 views

Is it possible to change the attribute that appears on the screen when I press the button “Identify features” above multiple points overlaid in QGIS?

In QGIS I need to map a lot of interest points in my city that was imported through a .csv file in order to compose the layer "Notas D6". I use the button "Identify features" to see more details about ...
0
votes
1answer
140 views

Creating multi-ring buffers around points in a single layer and for each point selecting neighbors within a specified radius in R

I have a CSV file of data on a set of 3000 points (locations) with respective coordinates and a number of attributes. I want to perform a regression analysis that takes cognizance of any spatial ...

1
2 3 4 5
11