Skip to content

Read geopackage (.gpkg) geographic data

Jan Kristian Jensen edited this page May 11, 2022 · 5 revisions

Geopackage is a modern, ligth weight and popular format for geographical data, mantained by the Open Geospatial Consortium. A geopackage file is a sqlite database file with some special tables, so any tool with sqlite support can read geopackage (*.gpkg) files. For visidata, simply append the --filetype sqlite argument like so:

vd FILENAME.gpkg --filetype sqlite

Don't let all the other tables confuse you

Below is a screen shot opening a geopackage file containing one single table, named myInterestingData. All other tables are geographical metadata and indexes. These are nescessary to extend a regular sqlite file into a geopackage file. Most tools with geopackage support will hide these tables from the end user.

image

Any table starting with gpkg, rtree*, rtree*, trigger* and the table sqlite_sequence do NOT contain the tabular data you're looking for, and should be ignored (unless you have a curious mind and want to poke around). In that case, the table geopackage_contents may be a good place to start poking.

Clone this wiki locally