Re: [gdal-dev] Improve clipping of shapefiles

2017-09-12 Thread Paul Meems
Thanks Mike for your reply. After clipping I'm doing a dissolve. The clipping takes 5 min, which is more or less acceptable for 2.8 million shapes. But the dissolve is taking over 30 min. for 680k shapes. I've added a spatial index using dsShapefile.ExecuteSQL("CREATE SPATIAL INDEX ON " + layerNa

Re: [gdal-dev] Improve clipping of shapefiles

2017-09-11 Thread Mike Toews
On 11 September 2017 at 21:09, Paul Meems 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. >

Re: [gdal-dev] Improve clipping of shapefiles

2017-09-11 Thread Jan Heckman
Can't really help you with the OGR part, however, I wrote utilities do solve this (really) fast for calculating grids based on this type of intersection. Speed is often a matter of using specific tools utilizing the characteristics of the problem, i.c. the fishnet regularities. Can you share the sh

[gdal-dev] Improve clipping of shapefiles

2017-09-11 Thread Paul Meems
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 -