Linked Questions

5
votes
1answer
4k views

How to efficiently determine which of thousands of polygons intersect with a linestring [duplicate]

I have a shapefile that contains several thousand Polygons/MultiPolygons and another shapefile that has a variable number of LineStrings. In the example below the blue Polygons are those that ...
13
votes
3answers
8k views

Understanding use of spatial indexes with RTree?

I'm having trouble understanding the use of spatial indexes with RTree. Example: I have 300 buffered points, and I need to know each buffer's intersection area with a polygon shapefile. The polygon ...
3
votes
1answer
7k views

How to find the intersection areas of overlapping buffer zones in single shapefile?

Find the intersections of the buffer zones I found an example where they tried finding the intersection of two different shapefiles -Intersect Shapefiles using Shapely. I've tried to adapt my code to ...
1
vote
1answer
3k views

Problem intersecting shapefiles with OGR in Python

I'm trying to move from ArcPy for geoprocessing. After searching some posts, I found this solution using the GDAL/OGR Python bindings: Intersect Shapefiles using Shapely My code is the following: ...
2
votes
1answer
2k views

ST_Intersect with ogr2ogr and Spatialite

I am trying to intersect Spatialite datasets with ogr2ogr, the OGR Virtual Format and SQL Syntax. I can't seem to locate whether the error is in my SQL query or my VRT file. Data rice_temperature....
4
votes
1answer
536 views

How to join attributes by location with command line?

I would like to join the attributes of two shapefiles by location but with a command line (Linux). This feature is easy in QGIS but it is VERY slow. Is there a way of doing this with ogr or PyQGIS?
3
votes
1answer
654 views

Selecting features within polygon from another layer in python?

Someone asked a nearly identical question about selecting features in a layer by location here Selecting features within polygon from another layer using R or Python?, but the answers are not for ...
2
votes
1answer
237 views

Extract intersections of 2 shapefiles with field subset in QGIS

I have 2 polygon shapefiles: A (with integer field "a_id") and B (integer field "b_id"). My goal is to extract intersections of polygons in layer A with polygons in layer B where attribute "a_id" is ...
0
votes
1answer
265 views

Given a LineString and a Polygon, detect which Polygon nodes are above or below the LineString

I have a Shapely Polygon and a LineString. I want to be able to determine which Polygon points are above the LineString and which are below. Alternatively, it would also be alright if I were to splice ...
2
votes
0answers
214 views

ogr2ogr: export intersected gml using shapefile

I'm trying to do the same as the ogr2ogr example given by https://gis.stackexchange.com/a/119404/6458 The difference is that my inputs are a GML and a shapefile. Export.shp should only contain the ...