Re: [Qgis-user] Crash: merge shapefiles
Merge shapes from SAGA GIS (which can be used via Sextante) is quite fast, even with large shapefiles. On Fri, Jul 5, 2013 at 10:25 PM, Giovanni Manghi giovanni.man...@faunalia.pt wrote: Hi, As I've got loads of shapefiles, to define the .prj for each is not realistic (VectorDataManagement ToolsDefine Current Projection). I've looked for a bulk process to create these but without luck Do I need prj files if so, how can I create a load of them? in QGIS master you can use SEXTANTE to batch process files, so you can use the reproject layer tool, and get a copy of your shapes with a proper .prj Then to merge the shapes you can use QGIS, but I agree that is very (very) slow for large shapes or large number of shapes. The faster tool/code I tested is http://gistncase.blogspot.pt/2012/05/python-shapefile-merger-utility.html and it would be very nice to use it to replace the actual python code of the merge shapefiles qgis tool, see http://hub.qgis.org/issues/7208 cheers -- Giovanni -- ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Crash: merge shapefiles
Hi Jonathan, You can use ogr2ogr to recursively create those PRJ files. You will need to make a bash script or bat file (depending on your platform of choice) that can read all your input shapefiles from a folder and execute the following command for each one of those: ogr2ogr -a_srs EPSG:27700 output.shp input.shp Obviously I'm assuming that you are using British National Grid hence the option -a_srs EPSG:27700. You can change this if you have your data in other projection. Hope this helps. Cheers, Hugo Martins www.lutraconsulting.co.uk On Fri, Jul 5, 2013 at 4:45 PM, Jonathan Webb jonat...@jwebbgis.co.ukwrote: Hi, ArcGis refugee using QGIS 1.8.0-Lisboa on Windows 7 64 bit. Trying to merge a quantity of (Ordnance Survey) height shapefiles QGIS crashes. I've read around and there seems to be a bug ( http://hub.qgis.org/issues/5962) but the thread was marked as closed so I'm not sure what the situation is. It seems that it will work if there are .prj files, so as a workaround I can create these. As I've got loads of shapefiles, to define the .prj for each is not realistic (VectorDataManagement ToolsDefine Current Projection). I've looked for a bulk process to create these but without luck Do I need prj files if so, how can I create a load of them? Thanks. -- Jonathan Webb Freelance GIS Specialist 07941 921905 www.jwebbgis.co.ukhttp://uk.linkedin.com/in/jwebbgis ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Crash: merge shapefiles
Hi, As I've got loads of shapefiles, to define the .prj for each is not realistic (VectorDataManagement ToolsDefine Current Projection). I've looked for a bulk process to create these but without luck Do I need prj files if so, how can I create a load of them? in QGIS master you can use SEXTANTE to batch process files, so you can use the reproject layer tool, and get a copy of your shapes with a proper .prj Then to merge the shapes you can use QGIS, but I agree that is very (very) slow for large shapes or large number of shapes. The faster tool/code I tested is http://gistncase.blogspot.pt/2012/05/python-shapefile-merger-utility.html and it would be very nice to use it to replace the actual python code of the merge shapefiles qgis tool, see http://hub.qgis.org/issues/7208 cheers -- Giovanni -- ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user