I am using now QGIS 2.18, which includes support for GeoPackage format.
I know that GeoPackage is like a replacement for Shapefile but not quite so, as GeoPackage has database capabilities. At same time, GeoPackage isn't a full replacement for SpatiaLite, because it doesn't have spatial queries and functions. Also, Spatialite supports GeoPackage.
So, in the context of QGIS editing, when does it make sense to use GeoPackage (and access GeoPackage from SpatiaLite for Spatial SQL tasks), and when is better to use just Spatialite?
Answer
A small comparison between GeoPackage and SpatiaLite in QGIS. Right to the moment it is not really productive to use GeoPackage with QGIS. May change pretty fast though (see addtions!).
Some additions regarding new QGIS 2.99 alias QGIS 3, Nov. 2017 (also added in comparison): GeoPackage now works nearly without any problems in QGIS 3. Did encounter some minor issues that may regard to QGIS developer version. Also the most problematic issue for SpatiaLite is solved. Columns can be deleted now without any additional workarounds. Both still does not support raster writing via the GUI which is not a big issue as rasters in a database is not the main intention. Both formats are a really good working formats. The focus for GeoPackage is transport-format and for SpatiaLite an easy file based database system with many tools for building a local data storage (as it is more of a RDBMS than file-format).
Both have:
- transactional
- SQL and views (but views are differently implemented in the using software)
- "all in one" vector-layers, symbology and text, raster
- attribut-tables with nearly no restrictions compared to shapefile
- do need a VACUUM from time to time (database specific data storage)
- most geometry types (like curves)
GeoPackage:
- is a OGC standard based on SQLite, means the implementation should be more consistent in different software; for example the symbology might work in QGIS and ArcMap in the future when SLD-Styles are used
- pretty young (2014), quite some problems with it in QGIS up to 2.18 (update: good support in QGIS 3)
- allows easy removal of columns in QGIS for "normal" users opposing SpatiaLite
- right now DB-Manager does not work very well with it and raster support is limited to reading a single integrated raster (no writing into it) (using QGIS 2.18.3) (update: DB-Manager works now good with geopackage)
- views not working in QGIS, but via virtual-layer not too much of a problem when not used for sharing between many users (update: still no views as QGIS 3 can actually create views but can´t read them afterwards)
- geoprocessing tools does not allow appending to existing file (only replaces the whole file) (update: works now)
SpatiaLite:
- is an extension to SQLite, differently implemented in GI-software (mostly due to driver and version issues)
- much older and up to now better integrated into QGIS
- in QGIS you can´t delete columns without a SQL-Query that is not complicated, but for some users already too much "code" (update: QGIS 3 does this now)
- pretty big file when only having a hand full of geometries, not quite good as transport format but for local database storage (it starts with something around 5MB)
- Lots of additional tools (views, may create road networks, many import/export formats, ST_Queries and more)
No comments:
Post a Comment