On 11 September 2017 at 21:09, Paul Meems <[email protected]> wrote: > I have a large shapefile with over 2.8 million shapes (fishnet) and I have a > border file with only 1 multipolygon. > > I'm trying to clip the fishnet with the border. > Using code is takes about 5 min. using command line it takes even longer. > > This is my command: > ogr2ogr fishnetClipped.shp fishnet.shp -clipsrc border.shp > ... > Can I somehow improve the speed?
If the fishnet shapefile does not have a spatial index, try creating one. There are a few ways to do this: http://www.gdal.org/drv_shapefile.html I'm not sure if -clipsrc datasource will use the spatial index, but it's worth trying. _______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
