0
votes
1answer
307 views

How to clip a line layer based on polygons with QGIS?

I have a line layer and a polygon layer. Both files have the same SRS. I want in a new shape file only the lines covered by the polygons. I tried in QGIS the Vector -> Geoprocessing -> Clip ...
0
votes
0answers
47 views

batch clipping code produces some shapefiles containing no features

#MASS CLIPPING (ogr2ogr) #Stefan Safranek #Shape Files by US-States import os, glob import subprocess from osgeo import ogr # Input folders saveFolder = "C:\\Users\\Stefan\\Desktop\\experiment ...
2
votes
1answer
263 views

Error when using gdal/ogr and python to clip a “shp” file by a “shp”

I am new to the gdal/ogr library for python and I was wondering how to clip a shp file by another shp file. I think I am having trouble with the syntax. Thanks - Stefan I keep getting a windows error ...
3
votes
1answer
139 views

shapefile batch clip and merge combined

I have two shapefiles, one is polyline, the other polygon. For each polygon I would like to clip the polyline vectors inside. Using arcpy I already found part of a possible solution: ...
3
votes
2answers
1k views

Is there a way to get at C's OGRLayer.Intersection() or OGRLayer.Clip() in Python?

I am working with OGR in Python and noticed that the C libraries have useful Intersection() and Clip() functions as part of the Layer class. Is there any way to get at these functions in Python? I ...