[Gdal-dev] ogr2ogr: merging multi shp data in one output

Mateusz Loskot mateusz at loskot.net
Thu Mar 8 06:29:36 EST 2007


Gennady Khokhorin wrote:
> Hello, List!
> I want to merge multiple shp files (blue.shp, red.shp) in one (ex. blue.shp) and got an error message:
> 
> ogr2ogr -update -append "blue.shp" "red.shp"
> 
> ERROR 1: Failed to create file blue.shp
> ERROR 4: Failed to open Shapefile 'blue.shp'
> ERROR 1: Terminating translation prematurely after failed translation of layer blue
> 
> Is it a bug or just shp driver can not append data?

Gennady,

Please, refer to the doc page about OGR driver for Shapefile:

http://www.gdal.org/ogr/drv_shapefile.html

At the bottom of the page, you can find "A merge of two shapefiles..."
example.

Hope that helps.
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list