I'm trying to figure out what Geopackages are and often I read "it's like a shapefile but not quite." Sometimes I also read that it's the equivalent to the ESRI Geodatabase.
What is the actual difference between Geopackages and shapefiles?
I'm trying to figure out what Geopackages are and often I read "it's like a shapefile but not quite." Sometimes I also read that it's the equivalent to the ESRI Geodatabase.
What is the actual difference between Geopackages and shapefiles?
I don't know much about the internal workings of either but I do have some experience with the practical differences.
Shapefiles are (as you probably know) actually a collection of files, and they contain a single dataset. This means that if you have a folder with three datasets in it then you can have anything from 9 to 18+ files in that folder.
If you use a geopackage (or spatialite) then it is a single file which can contain multiple layers or datasets. In that sense it's like a database. So when you create a geopackage you can save multiple datasets to it as seperate layers. This means your folder with three datasets now only contains one file. When you add the geopackage to QGIS (for example) then it asks you which layers or datasets you want to add.
Another massive advantage is that you can save layer symbology directly to the data. In QGIS you go to layer properties > style > save as default > save default style to datasource database. This means when you add that layer to another QGIS project it will keep the symbology you saved to it (bear in mind this doesn't work cross-platform).