Why you should use GeoPackage instead of Shapefile

For current cause I’m posting about the GeoPackage file format today.

Some of you may have asked yourself: ‘Why should I use GeoPackage?’, ‘Is GeoPackage better than Esri Shapefile?’ or even: ‘What is GeoPackage?!’

To cite Wikipedia: ‘An OGC GeoPackage (GPKG) is an open, non-proprietary, platform-independent and standards-based data format for geographic information system implemented as a SQLite database container.’

As you may have noticed, QGIS 3 switched from Shapefile to GeoPackage as default in most cases. Thus, rendering gets really fast. Loading, panning and zooming feel way more quicker with GeoPackage than with Shapefiles.

I tried to make a list with the cons and pros of both: GeoPackage and Esri Shapes. Perhaps it is more appropriate for you to switch to GeoPackage in the future.

 

Geopackage:

Pros:

  • OPEN
  • OGC standard
  • Broadly implemented (GDAL, QGIS, R, Python, Esri, …)
  • More lightweight than a real geodatabase, but as fast as a geodatabase
  • Everything is contained in a single file -> easier file management with GeoPackage than with Esri Shapefile
  • Faster work-flow than with Shapfiles.
  • There are nearly no limitations

Cons:

  • Relatively young (Encoding Standard (1.0) adopted by OGC in 2014). (But honestly, that’s not a real con…)
  • Raster support is relatively limited (personal experiences in QGIS)

 

ESRI Shapefile:

Pros:

Cons:

  • It is proprietary (closed and controlled by Esri)
  • It’s relatively sluggish
  • It’s a multifile format (.shp,.dbf.,.shx,.prj, encoding, other indexes, etc.) (everybody knows the problem with GIS newbies sending you solely the .shp… 😉 )
  • Attribute names are limited to 10 characters
  • No ability to store topologies in the files
  • Uses Esris WKT. Can result in inconsistencies
  • File size is restricted to 2 GB
  • Can only contain one geometry type per file
  • No real 3D support

 

As you see, there is no real reason to use still Shapefiles. Perhaps I could convince you to use GeoPackage instead of Esris stuff in the future. Personally, I would like to see more people I’m working with using GeoPackage. Of course, it’s not always useful to go with Geopackage; e.g. if you have huge datasets and want real DBMS capabilities, I would recommend to use PostGIS.
If you like GeoPackage, than share this information with your coworkers and collaborators!

The next days I will  give you a short tutorial on how to use GeoPackage in QGIS properly. So see you next time!

 

___

UPDATE, 2018-03-16: Thank you Andreas for the note. Similar or overlapping arguments can be found at schwitchfromshapefile.org (aka ‘Shapefile must die!’). If you are interested in other geodata formats compared to Esri shape, like GeoJSON, OGC GML, SpatialLite, CSV and OGC KML, also go and visit their site or cooperate with them on github.

About This Author

Simon is a research assistant in the field of remote sensing at Technical University of Munich (TUM). Currently he is working on methods to describe reed ecosystem parameters with the help of hyperpectral and LiDAR data. Besides geoinformatics he loves to do outdoor activities such as hiking and climbing.

2 Comments

You can post comments in this post.


  • First i am, with the the people from http://switchfromshapefile.org/ and the author we need a replacemant for the shapefile format.

    Second please Author if you copy the content from other, reference the original. Without your post is just a rip-off (plagiarism). And this copy is a bad copy, you reduced hard acceptable arguments against the shapefile to totally wrong arguments (e.g. no 3d support, a shapefile supports 3d in opposite to geopackage).

    Third geopackage can’t be a replacement for the shapefile format, because shapefile is an proprietary but open format which is technology neutral. You need just the white-paper for shape and dbase files and a programmer and you can easily read shapefiles on any platform in a few days. The geopackage recommendation is not technology neutral, it is bounded to the sqlite database implementation. To solve this dependency is a hard and expensive job, if you have to start from scratch.

    Andreas Bartels 5 months ago Reply


  • Dear Andreas Bartels from disy.net,

    we are always pleased about criticism in the comments, if it is justified.

    As far as I understand you in your English language, you have three points: (1) You consider this post as plagiarism. (2) You’re blaming me for using false arguments. (3) You believe that Geopackage cannot be a replacement for Shapefile.

    (1) I did not plagiarize or copy and paste anything here. All of the information is freely available on more or less official sites. The authors of http://switchfromshapefile.org/ also have collected the information from somewhere. Moreover, I am sure, that you do not have any association with the authors from http://switchfromshapefile.org/. These are open-minded people, as far as I can see – fighting for better GIS-world out there.

    (2) Please read the post again. Cannot find any false arguments… You are warmly invited to draw my attention again to wrong points (with a little more substance, please.)

    (3) Geopackage CAN be a full replacement (and even more) for Shapefiles. You write ‘shapefile is an proprietary but open format which is technology neutral’. That is only partially right. Per definition something cannot be ‘proprietary’ and ‘open’ at the same time. To cite wikipedia: “An open specification is a specification created and controlled, in an open and fair process, by an association or a standardization body intending to achieve interoperability and interchangeability. An open specification is not controlled by a single company or individual or by a group with discriminatory membership criteria.” https://en.wikipedia.org/wiki/Open_specifications

    So much for me to say. Now you know…
    One more note: We are not making ANY money with this blog, neither are we planning to do in the future. This is our hobby, solely. Anyway, we are publishing any of the comments here, because we believe in the positive effects of transparency.

    P.S. I have to admit: I copied the .png ‘I prefer geopackage’. But it’s under CC and it’s a meme – and good memes only become good memes if they are funny and broadly used… 😉

    Simon 5 months ago Reply


Post A Reply

*