Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [select-by-location]

Select features based on their geographic position relative to features in another layer

Filter by
Sorted by
Tagged with
43
votes
2answers
75k views

Selecting features within Polygon from another layer using QGIS?

I'm using QGIS 1.8 with a PostGIS database and I have three PostGIS-layers in QGIS a lines layer, a points layer and a polygon layer. What I'm trying to do is to select a polygon in the polygon layer ...
6
votes
1answer
432 views

Getting different results using Select by Location with ArcPy vs ArcMap?

I have two different layers. One layer contains features that are supposed to sit directly on top of features in the other layer. With ArcPy I'm doing a SelectLayerByLocation with "ARE_IDENTICAL_TO" ...
3
votes
2answers
3k views

Using Select By Location to update field in feature class using ArcPy?

I am using Arc 10.1 and I am working on a script that takes a value from a field within one shape file and updates a field in another shape file based on its location. Basically I have smaller parcels ...
7
votes
2answers
2k 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 ...
2
votes
3answers
890 views

Best way to find points outside state boundary that are supposed to be within specific State

I have a nationwide featureclass called bakeries. In the bakeries FC, there is a field called "State" and the field is populated with state abbreviations(AL,NJ,CT,etc). I have another feature class ...
1
vote
2answers
553 views

Selecting isolated polygons which are not donuts but may overlap using ArcGIS Desktop?

I'm exploring a few different options for this process and I'm unsure what would be most effective. I'm trying to find all isolated, non-intercepting polygons in the same layer (not to merge). Most ...
9
votes
3answers
3k views

Performing a Spatial Query in a loop in PyQGIS

What I am trying to do: loop through a point shapefile and select each point that falls into a polygon. The following code is inspired by a spatial query example I found in a book: mitte_path = r"D:\...
4
votes
1answer
9k views

Selecting features that do NOT intersect in ArcGIS Desktop?

I used the "create spatially balanced points" in Geostatistical Analyst in ArcGIS 10 to generate a large set of points with equal inclusion probability but a "spatially balanced" dispersal. I then ...
2
votes
2answers
1k views

Select features from another layer based on a selection in PyQGIS

I have two polygon features: epoca and result. I would like to select the features that correspond to the number 1 feature (features A and B) and then select the corresponding features with the ...
3
votes
4answers
212 views

Selecting features with same geometry in one shapefile

@TeddyTedTed's answer is nice, however, I am looking for something more efficient. I am working on a public transport network in one shapefile (polyline type) in QGIS 2.18. Certain bus routes ...
1
vote
1answer
3k views

Join Attributes by Location - Precision

What does "Precision" do within "Join Attributes by Location"? Also, what's the difference between the "Geometric Predicates"?
1
vote
1answer
1k views

Debugging Select By Attribute tool within loop giving ERROR 000358: Invalid expression Cannot acquire a lock?

I have seen several similar posts related to this technique but I am still having issues. The following script is intended to select all points from one shapefile that are within the boundaries of a ...
5
votes
2answers
1k views

Selecting features within certain buffer distance of selected feature using PyQGIS?

I have a shapefile of thousands of polylines. I have select one feature, I want to select all other features that is within say 100m of the selected feature. How do I achieve it by pyqgis?
4
votes
2answers
815 views

Selecting set number of points within polygon grid cells using QGIS?

I have a polygon grid with 1 square kilometer area cells, and over it a set of points, like so: What i need to do is select and extract only a single random point per grid cell. I could do that ...
4
votes
2answers
4k views

Selecting features by location based on selected feature using ArcObjects?

I am very new to ArcGIS and ArcObjects. I am writing a code for a button that will detect a selected feature and then select other features based on the feature that I had selected please take a look ...
4
votes
2answers
428 views

How to select parcels in ArcPy situated in a different county than is written in the attribute table?

I have two polygon feature classes: one with parcels, the other one with counties (40 counties) I have to identify the parcels that in the attribute table belong to county 'X', but spatially they ...
3
votes
3answers
9k views

Automating Select by Location in ArcGIS Desktop?

I have 2 shapefiles (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 ...
2
votes
1answer
455 views

pyqgis: select features inside a buffer, then return some attributes of the selection as a list

I'm a python and pyqgis beginner (2 months-self taught) and I found it really hard to learn pyqgis API in comparison to the other APIs like kivy or Pyqt4. I'm writing a qgis plugin that user select ...
1
vote
1answer
135 views

Batch updating point attributes based on values of underlying polygon using ArcGIS Desktop?

I have a points shapefile with a blank field. I want to populate this field with an attribute obtained from another underlying (polygon) shapefile. I can do this for a single record easily using ...
1
vote
1answer
428 views

Random selection of points in SpatialPointsDataFrame R object with distance constraint

I need to select points randomly (without replacement) from a SpatialPointsDataFrame (input object) in R with a minimum distance of 3,000 meters between them. I want to get random 50% of all points. I ...
8
votes
1answer
1k views

Understanding Precision parameter in Select By Location tool of QGIS?

Is there anybody that can tell what is the purpose of having a "Precision" parameter on Vector | Research Tools | Select by Location? Where I can find or read about how this "Precision" parameter ...
7
votes
2answers
4k views

Select by “Not-in” Location?

I have a point layer of students, and a polygon layer of district boundaries. How can I select those students who are not in the district boundaries, a Select By "Not-in" Location, so to speak.
5
votes
2answers
8k views

Finding polygons within polygon using ArcGIS Desktop?

I am new to GIS and ArcGIS. I have a set of polygons, some of which enclose other polygons. They are lake polygons, and within lake polygons, are smaller island polygons. If I have a given lake ...
4
votes
4answers
1k views

Retaining all fishnet grid squares within boundary of polygon from another feature class?

I have created a fishnet grid (3km x 3km) over a vector polygon. I now want to clip the fishnet over the vector polygon retaining all grid squares within the boundary of the polygon. Therefore I ...
3
votes
1answer
2k views

Iterating Select By Location in ModelBuilder?

I need to do exactly what the help topic http://resources.arcgis.com/EN/HELP/MAIN/10.1/index.html#/Select_By_Location_Select_based_on_spatial_relationship_within_the_layer/0017000000tr000000/ says can ...
3
votes
1answer
174 views

Select polygons with other polygons layer? [closed]

I have to select some polygons with another polygon layer. I have to select green polygons using relevant overlapping percentage with the purple ones. In this particular example, I would like to ...
3
votes
1answer
314 views

How to run QGIS algorithms with selected features?

In the QGIS GUI, the select-by-location algorithm has a choice to only use the selected features from the INTERSECT layer. How can I do this (or use any other algorithm) in a python script for QGIS 3? ...
2
votes
2answers
766 views

Select by location is not working in the processing modeler

When I run the modeler in qgis 2.14 I get no results from the select by location algorithm. I tried outputting my buffer polygon and using the select by location plugin and it worked fine. I have ...
2
votes
2answers
173 views

Calculating point layer values within polygon features in QGIS 2

There are two layers polygon BereichBerechnung with a field "Are_Number" points EW2017 with a field "EWjeAdr" In QGIS with a Virtual Layer, I want to calculate the sum of the field "EWjeAdr" for ...
2
votes
1answer
2k views

Selecting cells within polygon layer without extracting them using ArcGIS Desktop? [closed]

I know how to use the tool, Spatial Analyst Tools > Extraction > Extract by mask for cells that lie within a polygon shapefile, but is there anyway to just select those cells without having to ...
2
votes
3answers
240 views

How to write FIDs of points within each polygon to polygon field?

I have two feature classes one with points one with polygons (in ArcGis 10.2). Now, I want to write into a String Field of the polygon layer a list of all the Point-FIDs that are within each polygon (...
1
vote
0answers
673 views

QGIS select by location doesn't use selected features only

I'm using QGIS 2.14.3 - Essen (but have also tried 2.18.12 Las Palmas) Using 2.14.3, if I select one feature in a vector layer, and then use [Vector][Research][Select by Location], I have the option ...
1
vote
1answer
840 views

QGIS - select or export point attributes by polygon feature

I have two layers, one polygons of boundaries (similar to say local government areas) and a point layer of hospitals. I want to select all of the hospitals within a particular area (ie a particular ...
1
vote
1answer
870 views

Selecting parallel line segments but not segments that intersect

I have 2 different shapefiles that each have railroad track on them. Most of the track being displayed is the same, but since it is coming from 2 different sources, the physical lines themselves are ...
1
vote
1answer
319 views

Python code to select streamlines within selected watershed

I'm trying to calculate total stream length for multiple, overlapping watersheds (i.e., each watershed contains the watersheds upstream of it). I have a flowline layer that I've run through the ...
1
vote
1answer
489 views

How to merge adjacent polygons with no common attributes in GRASS?

Many topics are talking about merging polygons based on their common attributes, but few (or none) give a real answer to location-based merging problem. Explanation. Here is a fraction of the base ...
1
vote
2answers
515 views

How to “select by location” certain points

I have a small problem - how to select the points on the line but not select the points at the intersections of lines using "select by location"? Illustration below. I am using ArcGIS 10.0
0
votes
1answer
245 views

Calculating well densities in selected counties using ArcPy?

I am trying to calculate: total numbers of wells that fall into each county in a shapefile, and update the county table with the total count. calculate the well density (how many wells there are per ...
0
votes
1answer
766 views

Select points within a buffer in QGIS

In my vector layer I want to select points within a buffer of 12 meters and with an exception (if 'Name' is not "James" than select). Is this possible with "select by expression"?
0
votes
1answer
152 views

how to identify cross streets for points that are not at intersections? [closed]

I have points that fall in the middle of city streets (so not at an intersection). I would like to automate (ideally, with python) a way to identify the cross streets that these points are between. ...