[QGIS-Developer] Overlay Intersect of 2-Esri Shapfiles

jshouser64 jshouser64 at gmail.com
Fri Mar 2 08:22:25 PST 2018


I want to write a script in Python to perform an operation between two ESRI
shapefiles. 
1. One shapefile (*overlay*), Ownership, containing one or more polygons. 
2. 2nd shapefile (*Input*), may be Points, Lines, or Polygons 

The script would find all Input shapes that are "touching" (*wholly or
partially within*) any of the Ownership polygons (*overlay*).  All features
that are touching the input shape, would then be written out to a new a new
shape. 

I've been learning about the OGR/GDAL library, so I know about code like
this: 
        doesIntersect = ownershipPoly.Intersects(inputFeature) 

However, I am still fairly new to Python-based GIS work, so I'm still
learning about the various libraries that are available. Is the above
OGR/GDAL code the most efficient way to do it or is there something else
more appropriate? 

Jeff




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html


More information about the QGIS-Developer mailing list