Merge shapefiles

This tool can be used to merge two or more vector files. The input shapefiles must be of the same ShapeType (e.g. POINT, POLYLINE, POLYGON, etc.). The output file will have an attribute table that is the combination of the inputs.


See Also:

Scripting:

The following is an example of a Python script that uses this tool:

wd = pluginHost.getWorkingDirectory()
# The names of the multiple input files must
# be separated by semicolons in the string.
inputFiles = wd + "input1.shp" + ";" + wd + "input2.shp" + ";" + wd + "input3.shp"
outputFile = wd + "output.shp"
args = [inputFiles, outputFile]
pluginHost.runPlugin("MergeShapefiles", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
// The names of the multiple input files must
// be separated by semicolons in the string.
def inputFiles = wd + "input1.shp" + ";" + wd + "input2.shp" + ";" + wd + "input3.shp"
def outputFile = wd + "output.shp"
String[] args = [inputFiles, outputFile]
pluginHost.runPlugin("MergeShapefiles", args, false)


Credits: