merge_geom_layers

io.merge_geom_layers(out_fn, in_fn, driver=None, append=True, overwrite=False, single_layer=False, out_layer_name=None)

Merge multiple vector layers into one file.

Either in one layer or multiple within the new file. Also usefull for appending datasets.

Essentially a python friendly function of the ogr2ogr merge functionality.

Parameters

Name Type Description Default
out_fn Path | str The resulting file name/ path. required
in_fn Path | str The input file(s). required
driver str The driver to be used for the resulting file. None
append bool Whether to append an existing file. True
overwrite bool Whether to overwrite the resulting dataset. False
single_layer bool Output in a single layer. False
out_layer_name str The name of the resulting single layer. None
Back to top