I am trying to merge many shapefiles into a single gpkg using ogr2ogr (version 3.0.2).
The command I am using is:
ogr2ogr dst.gpkg src.shp -nln layerOne
ogr2ogr dst.gpkg src.shp -nln layerTwo
BUT when I run ogrinfo it says my dst.gpkg
has only layerTwo
.
Best Answer
You are overwriting
dst.gpkg
every time you runogr2ogr
. From the geopackage documentation:So do:
Or if all source shapefiles are in a single directory: