GDAL: Convert Shapefile to a Geopackage

  • Software: GDAL 3.5
  • OS: Any
  • Updated: August 2022

AS an example you have a shapefile (or several shapefiles) and you want to convert them into a geopackage

  1. Open a terminal or the OSGEO4W Shell.
  2. Do the following:

ogr2ogr -f GPKG your.gpkg firstfile.shp

If you have a second shapefile you wish to include in the geopackage

ogr2ogr -append -f GPKG your.gpkg secondfile.shp

To check:

ogrinfo -so your.gpkg