LinuxCommandLibrary

ogrmerge.py

merges vector datasets

TLDR

Merge shapefiles
$ ogrmerge.py -o [output.shp] [input1.shp] [input2.shp]
copy
Merge to GeoPackage
$ ogrmerge.py -f GPKG -o [output.gpkg] [*.shp]
copy
Merge with single layer
$ ogrmerge.py -single -o [output.shp] [*.shp]
copy
Overwrite output
$ ogrmerge.py -overwrite_ds -o [output.shp] [input*.shp]
copy

SYNOPSIS

ogrmerge.py [options] -o output inputs...

DESCRIPTION

ogrmerge.py merges vector datasets. Combines multiple files into one.
The script consolidates geospatial data. Part of GDAL Python utilities.

PARAMETERS

-o FILE

Output file.
-f FORMAT
Output format.
-single
Merge into single layer.
-overwrite_ds
Overwrite existing output.
-a_srs SRS
Assign coordinate system.
--help
Display help information.

CAVEATS

Part of GDAL. Python script. Requires compatible schemas for single layer merge.

HISTORY

ogrmerge.py was added to GDAL for convenient vector data merging.

SEE ALSO

ogr2ogr(1), ogrinfo(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard