The selection of data from a database based on some criteria.

learn more… | top users | synonyms

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

Getting list of selected features in ArcGIS for Desktop using Python code?

I have a question regarding selections in ArcGIS for Desktop. Assumed I have one layer in ArcMap and I have selected two of five features. Is it possible to get a list of all selected features by ...
15
votes
7answers
30k views

Select distinct values from a single column of an attribute table (or layer)

Is there a way to select distinct values from a column in ArcMap? I have the data in both GDB and SHP formats. I have searched for ways to select using SQL, QueryLayers, ModelBuilder and individual ...
15
votes
3answers
5k views

Quickest way to select ArcSDE polygon by point in ArcGIS Desktop using ArcPy?

I keep thinking that I must be missing something, but there does not seem to be a tool in ArcGIS 10 to select features (in particular polygons) from a layer at a point (X,Y) location via ArcPy. The ...
14
votes
3answers
12k views

Including variable in where clause of arcpy.Select_analysis()?

I am trying to loop through a shapefile, selecting each feature in turn and copying it to a temporary shapefile to by included in a union analysis. I'm using a cursor to find the ID name for each ...
12
votes
2answers
6k views

How to display only selected features on map?

Not sure if this option ever existed, but the new QGIS version hides a lot of things somewhere else and this seems so simple that I'm kind of convinced it was possible to do this before. I have quite ...
10
votes
1answer
3k views

When iterating over a vector layer with pyqgis, how do I check whether a feature is selected?

While iterating over a vector layer using the following code (summerized from the example in the pyqgis cookbook), is there a way to check whether a feature is selected? provider = ...
9
votes
2answers
8k views

Setting which layers are selectable in ArcMap?

I cannot figure out how to toggle selectable layers in ArcMap 10. In 9.3, I remember being able to choose from a list which layers I wanted to be able to select features from in the map. Let's say ...
8
votes
2answers
971 views

Simple way to detect/select border polygons of a shapefile

I am looking for a simple way to detect/select border polygons of a shapefile. Border polygons are here polygons that are not completely surrounded by other polygons i.e. polygons located at the ...
7
votes
2answers
8k views

How can I unselect a feature in Openlayers?

I am able to identify the selected features on my map using the following line: vector_layer.selectedFeatures I would like to be able to deselect this feature using a standalone function (not an ...
7
votes
1answer
7k 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 ...
7
votes
1answer
3k views

How to select specific row in attribute table using ArcPy (without iterating through whole table)?

I am using ArcGIS 10.2 and have assumed until now that it is possible to select a specific row in an attribute table. However, I can't seem to find a way to do this. The only available methods seem to ...
7
votes
2answers
105 views

Features to stay selected by default in QGIS?

Does anyone know if there's a way to configure QGIS so that when you plot a new feature (i.e. a polygon), it stays selected by default? If I have to select it separately, and it happens to fall on ...
7
votes
1answer
239 views

How to select features based on multiple values in graphical modeler?

I'm trying to create a basic model using QGIS, the QGIS graphical modeler and the sextante toolbar. In part of the model, I need to select features based upon multiple attribute values (for example - ...
6
votes
3answers
269 views

How to select specific rows of polygons from a grid in QGIS?

I have a polygon layer. I would like to select every second row of the polygons but not manually. Is there an expression to select every second row as seen on the picture with Select by expression in ...
6
votes
1answer
9k views

How to Export Selected Feature to New Shapefile Using ArcPy?

I currently have a search cursor iterating through a shapefile in ArcGIS 10.1 that selects a feature and runs a viewshed analysis on that feature (and only that feature). What's the easiest way to ...
6
votes
1answer
3k views

How to select multiple Features from multiple Layers in OpenLayers?

Is there a way to select multiple features from multiple vector layers by using clickTolerance in click? I checked the documents of getFeature control and selectFeature control, seems not work in ...
5
votes
6answers
780 views

How to divide a feature class into ranges?

I have a shapefile consisting of around 4000 polygons. The polygons are created from buffering around a similar number of islands somewhere in the Norwegian archipelago. Due to an error in the ...
5
votes
1answer
914 views

How to eliminate small polygons using ModelBuilder to iterate through feature classes

I created four large polygon feature classes of surface slope classes from a grid of 6-foot cells covering half my county. In order to repair the geometry and eliminate small polygons I broke four ...
5
votes
2answers
1k views

How to detect duplicates and keep only one?

I've got a table with lots of points (200.000). Some of them are duplicates (not exactly but e.g. a metro station has eight entrances) and I want to keep only one of these metro entrances. I am able ...
4
votes
1answer
400 views

Set selection color transparent and border color red in QGis using python

I have a layer with different informations. I want to change the selected polygon color to "Transparent". I am able to achieve that using: iface.mapCanvas().setSelectionColor( QColor("Transparent") ) ...
4
votes
1answer
4k views

How to select and copy a group of polygons in QGIS?

I'm new to QGIS. I opened a few shapefiles that cover Europe. Now I want to select a smaller area and if possible copy the polygons in this area so I can work with a smaller set. How should I do this ...
4
votes
1answer
953 views

Selecting several disseminate features with ArcGIS API for JavaScript?

I have a cadastral map similar to this one from an ArcGIS Javascript API example: Cadastral map What I would like to do is selecting several parcels clicking on them and show the information related ...
4
votes
1answer
92 views

Select feature one by one and save it as image

I have used following code for selecting the features and save it as image. layer = self.iface.activeLayer(); layer.setSelectedFeatures([]) count =layer.featureCount() lstChalta = [] lstFeatures = ...
4
votes
2answers
794 views

Problem with multiple feature selection

In an attempt to retrieve all features (point geometry) that fall in a selected polygon, I get the error this.layer.addFeatures is not a function. My code is as shown below: function ...
4
votes
2answers
581 views

Unable to select Vector Layer

I am using the following example, to select a vector layer feature on click. The example demonstrates Highlighting and selecting the layer. I was able to successfully implement the Highlighting of the ...
3
votes
2answers
3k views

Selecting features through ArcPy gives Assertion Error?

I would like to achieve the following functionality through arcpy: Querying an existing baselayer on time and create a new layer Apply symbology from an existing layer and add the new layer to the ...
3
votes
2answers
70 views

How to select the most populated neighbourhood of each town in the country using QGIS?

I have data from a national census with population for each neighbourhood, grouped by municipality and town, in the country. I want to select the most populated neighbourhood of each town (there's a ...
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 = ...
3
votes
3answers
2k views

Missing tools (icons) QGIS

I lost selection and navigation tools from the GGIS 1.8 toolbar when I tried drag then to different place. I can't get them back anymore. Where they disappear? All these tools are checked but are ...
3
votes
2answers
78 views

Copy/convert selection into filter/query builder of QGIS?

Can anyone tell me if it is possible (and how) to convert or copy a selection on a layer (that has not been created through "select by expression", but instead by irregular selections from a canvas, ...
3
votes
1answer
341 views

How to remove a feature from a layer created with “Make Layer From Selected Features”?

In ArcGIS desktop, I select some features from a feature class (say with the "Select By Location" function), and then right-click and choose "Selection--> Make Layer From Selected Features"(online ...
3
votes
2answers
767 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
2k views

QGIS select feature, “add to current selection” feature

I am trying to perform a feature selection on qgis similar to "add to current selection" interactive selection method in Arcgis Desktop, is that possible? An example: I perform a spatial query and ...
3
votes
2answers
3k views

How to select features in ArcGIS based on their relation to other features within same layer?

I want to select all the features in my Waterlines layer that share a line segment with other features in the same layer. I've done a complicated search cursor iteration in python that takes a couple ...
3
votes
3answers
804 views

Select “interior” lines of a polygon-to-line layer

I have a polygon featureclass that has adjacent features. Using Arc10, I am turning those polygons into lines using the "Featureclass to Lines" tool. Now I would like to select ONLY THE INTERIOR ...
3
votes
1answer
64 views

Select by expression and remove points

How do I select points by expression and delete these selected points? Is it possible to do this inside the modeler with a tool? The selection by expression works fine but do I have to set all the ...
3
votes
1answer
456 views

How to create and remove multiple QgsRubberBands in PyQGIS?

Currently the following code-snip works great to highlight a shape based on the 'feature' and 'layer' variables: self.rubberHighlight = QgsRubberBand(self.iface.mapCanvas(),QGis.Polygon) ...
3
votes
3answers
409 views

Select layer by attribute: return top 3 records

I have a feature class in a file geodatabase using ArcGIS 10.1. I want to create a model that selects the three features with the highest values in one field (Average Price). Basically I want my ...
3
votes
2answers
1k views

How can one select only displayed features using the select by rectangle tool? [closed]

I have a shapefile with many features, only some of which are displayed. I'm using the "Select Features by Rectangle" tool (the one where you click and drag a box over the features you want to ...
3
votes
3answers
199 views

How can I select “ultimate perimeter” from a group of connected lines?

I have a number of drawings which I converted into geodatabase feature classes. Most drawings are composed or connected 3D polylines from which I want to construct TIN surfaces and multipatch ...
3
votes
2answers
416 views

Listing features in the order they were selected

This is an ArcObjects-specific version of this question: Create Array From Selected Features Based on the Order in Which They Were Selected Is there a way to get the selected FIDs of a feature layer, ...
3
votes
4answers
4k views

How do I create a mask where the masked area can be changed by selection?

I'm working on making a mask in QGIS to have one area(county A) outlined while the other areas(counties) are under a semipermeable layer. I already know how to do this for one selected area. But my ...
3
votes
1answer
1k views

How do I fire a function after all features have been selected by a box in OpenLayers?

I have a map rendering with Polygons on a Vector layer set up as features. I set up the features so they fire off a function when the feature is selected and this works fine. The issue I'm having is ...
3
votes
2answers
36 views

How to Select a Polygon beneath another Polygon in QGIS 2.14

We have a series of layers that contain polygons with additional polygons 'underneath' each polygon. How do we select the polygon beneath the existing feature without also selecting the feature ...
3
votes
1answer
17 views

Cannot get Remove From Current Selection to work in ArcMap?

I am a Newbie using ArcGIS 10.3 for Desktop: After importing a whole watershed streams Layer, I selected by location a subset of the streams which was already defined with a separate name. ...
3
votes
1answer
67 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 ...
3
votes
3answers
1k views

How to select features with NULL Geometry from Shapefiles?

I have been given a Shapefile that contains records with NULL geometry, along with records with non-NULL geometry. This situation appears to cause problems in QGIS (1.8 and 2.0) when editing the ...
3
votes
2answers
2k views

ArcObjects snipped to Select all Features currently visible on the ArcMap screen (ActiveView)

I guess I have to get the extent of the ActiveView and then use it to perform a spatial search. Is that the proper way to do it? Please share the code snipped if you have any. Thanks.
3
votes
1answer
227 views

Getting Annotation selection using ArcObjects?

I have annotations stored in mxd document, when I select some annotation, I tried to get the selection through graphics selection, so I always get the rectangle of the dataframe (because I'm working ...