Well, attach a debugger to the ogr2ogr process and see where the time is spent.
your SQL clause could be replaced by "-fid 1", but I'm not sure that the reason for the slowness. > Hello, > > I'm working with a MIF file, contaning just 5 multipolygons (in form > of "regions", in MapInfo terms). But the file weights 700MB. So, the > multipolygons are really big. I'd like to transform my file to SHP or > PostGIS using ogr2ogr, but any operation takes forever. > > My current approach is to use -sql flag this way: > > ogr2ogr -sql "select * from my_layer where fid = 1" my_layer.shp > my_layer.mif > > But after 2 hours, it still continues working. I've activated debug, > and last text I've seen is: "Shape: Treating as encoding > 'ISO-8859-1'." > > All the clip operations I've tried with ogr2ogr have the same > problems: I have to wait hours, and after that, I just get a SHP of > 100 Bytes. So, I kill the process. > > Should I be more patient? Or is there any smarter approach to handle > this kind of file? > > Best regards, -- Geospatial professional services http://even.rouault.free.fr/services.html _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev