Tagged Questions

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

learn more… | top users | synonyms

5
votes
1answer
256 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 ...
2
votes
2answers
106 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 ...
0
votes
0answers
173 views

Show live attribute when hover in a map

i'm still new in openlayers. i would like to show "location" attribute on right corner of the map when hover in map. my map consist of of many attributes and one of them is location. how can i ...
1
vote
1answer
287 views

Select by SQL in QGIS Python

In the GUI there is the Query Builder, but that does not seem to be easily available in Python. The processing (SEXTANTE) module has the qgis:selectbyattribute algorithm, but that only supports ...
6
votes
2answers
122 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 ...
1
vote
2answers
94 views

Selecting a polygon within polygon where part of its boundary is the same. PostGIS

I would like to know how can I select a A_polygon within B_polygon, but part of the boundary of the A_polygon touch the B_polygon boundary. In Postgis 2.0, I tried few options but they didn´t work ...
3
votes
3answers
708 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 ...
1
vote
1answer
552 views

Subquery a list in select layer by attribute management using python

I am new to python and having trouble with my script. I want only the records from the COMTRS field (of the pur_dbf_view) that match values from the ComtrsList to be selected; however, I am getting ...
2
votes
2answers
855 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. ...
1
vote
1answer
169 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 = ...
1
vote
1answer
200 views

OGR: How to save layer from AttributeFilter to a shape filter?

I select a subset of features from my shape file like so: node_lyr = nodes.GetLayer() q_str = "%s = %i" % (field, value) node_lyr.SetAttributeFilter(q_str) What is the best way to make a shape file ...
0
votes
2answers
308 views

Arcpy SelectLayerByAttribute_management where_clause with LIKE not returning like values

I am selecting 2 intersections from a shape file using info from a File Geodatabase Table. The values are very similar as shown in example at the bottom. I am using a LIKE in the statement but it is ...
0
votes
0answers
26 views

How to select areas from a target layer which do not intersect source layer? [duplicate]

I have two different layers, one is county boundary and another one is soil map. My question is I would like to select only those areas which are outside the county boundary. Using "Select by ...
2
votes
1answer
410 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 ...
0
votes
1answer
118 views

ogr SetAttributeFilter uppercase?

How do I use the ogr SetAttributeFilter with uppercases? Code example: lyr = shp_obj.GetLayer() sel_str = "%s = '%s'" % (field, value) lyr.SetAttributeFilter(sel_str) Can I just do: sel_str = ...
1
vote
1answer
580 views

Creating a layer after using SelectLayerByAttribute_management

Is it possible to use an existent layer to do a selection by attributes without having to use MakeFeatureLayer_management first? Because I already have a layer with the same name as the feature class ...
0
votes
2answers
431 views

How to iterate through only select attributes of a single field using ModelBuilder in ArcMap 10.1

The feature class that I am iterating with ModelBuilder is a polygon FC called "Alignment" in my model. My current solution to iterating through only certain attributes of a single field does not seem ...
1
vote
2answers
145 views

how to add a raw input to a SQL string?

I have this py script for selecting one point. # Within selected features, select only those points of a chosen value arcpy.SelectLayerByAttribute_management("Stations", "NEW_SELECTION", ' "OID" = ...
1
vote
1answer
138 views

Easy Extraction of features from a Feature dataset ( Not feature class)

My Feature dataset (residing inside a GDB) contains more than 30 feature classes and every month I like to extract features from this GDB based on one attribute, which is repeating in all the feature ...
1
vote
2answers
727 views

How to select features in layer using dataset statistics (stdev and mean) and ModelBuilder?

I am trying to solve following problem. I need to select features from the shapefile by attribute in Model builder. The attribute should be a statistics which you can calculate by the tool :"Summary ...
1
vote
2answers
743 views

Select by Attribute on Date field using wildcards?

I have a date field within a file geodatabase (10.1). An example of a value in this field: 19/11/2012 08:49:56 I want to select all rows where the time is between 9pm to 11pm AND 6am to 9am. I ...
2
votes
1answer
347 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 ...
3
votes
2answers
375 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 ...
2
votes
3answers
609 views

ArcObjects identify tool [closed]

I'm using ArcGIS 10.1 and developing an application using visual studio 2010 and ARCObject SDK 10.1. I would like to use identity tool in my application and if not possible I want to execute a query ...
2
votes
2answers
127 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' ...
4
votes
1answer
167 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
746 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", ...
6
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 ...
2
votes
2answers
114 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 ...
4
votes
1answer
211 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 ...
3
votes
1answer
103 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 ...
4
votes
3answers
818 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?
2
votes
1answer
171 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 ...
6
votes
2answers
268 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 ...
4
votes
1answer
150 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 ...
5
votes
1answer
1k 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 ...
9
votes
0answers
7k views

Splitting feature class by unique values for an attribute/field in ArcGIS for Desktop? [duplicate]

I would like to split a single shapefile into multiple shapefiles by using unique values for one attribute/field to select features for each value out into a new feature class. I found ET Geowizard ...
3
votes
3answers
3k 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 ...
0
votes
2answers
234 views

ArcGIS: Summarised Inside Join with Attribute Criteria

I have a situation in which I need to find how many points lie within a polygon, this would be quite simple with a summarized inside join from points to polygons except for the fact that the points ...
1
vote
1answer
478 views

spatial join by attribute match from shapefile

i require to spatial join the shapefile having attribute by ie selecting by attribute which remains same for the target and join feature and get the output as per attribute selected i want to prepare ...
4
votes
1answer
263 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 ...
2
votes
0answers
258 views

How to program select by attribute unique values using ArcGIS silverlight API?

I'd like to create a select by attribute window in my webGIS using silverlight api . this is like select by attribute in arcgis desktop . i create select layer combobox ( cbolayers)and select fields ...
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 ...
2
votes
2answers
473 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 ...
1
vote
1answer
484 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 ...
3
votes
4answers
9k 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 ...
1
vote
3answers
5k views

Python Script for Select by Attributes taking user input

I am trying to write a python script and create a script tool in ArcGIS that will let a user choose the value or values that will be used to extract a shapefile. These selected value(s) will then need ...
6
votes
1answer
3k 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
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 ...
3
votes
1answer
385 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 ...