When I try to find the intersection of a line gdb layer with a polygon layer I get the following error: Can only insert a LineString/MultiLineString/CircularString/CompoundCurve/MultiCurve in a esriGeometryLine layer')
It works fine for point or polygon layers.
Here is my code:
for cliplayer in aoi_ds: driver = ogr.GetDriverByName('OpenFileGDB').CreateDataSource(outgdb)
outlayer = driver2.CreateLayer(inlayer.GetName(), inlayer.GetSpatialRef(), inlayer.GetGeomType()) for x in range(defn.GetFieldCount()): outlayer.CreateField(defn.GetFieldDefn(x)) ogr.Layer.Clip(inLayer, inClipLayer, outLayer) inlayer.SetAttributeFilter('') inlayer.ResetReading()
How can I filter out the points being created in the clip command?