ArcGIS Pro

How to Use OGC GeoPackages in ArcGIS Pro

Everyone likes SQLite databases—they are a single file, perform and scale well, support enough SQL to be useful and have a DB API-compliant Python module and API access in other languages. SQLite databases can power a lot of mobile and desktop apps, ArcGIS Pro included.

SQLite as a container has an incarnation—OGC GeoPackage—that supports the encoding of vector and raster features for direct use in ArcGIS Pro. You can read about the standard here.

The GIS format most often compared with GeoPackage is the Esri-defined shapefile. Shapefile is the most shared GIS format on the planet and its encoding of vector features is published. Note however the publication date—1998. At the time the shapefile was designed, the components available had limitations that can frustrate today’s advanced workflows. These include file size limit, attribute field count and name width limits, dates not supporting time, complexity in handling character encodings and lack of null value support for most field types. Shapefile has been spectacularly successful for handling simple vector features, but it can be limiting.

I think of GeoPackage as the new shapefile without the old limitations and I encourage you to as well, it is a great format for, well, geo-packaging! However, don’t go as far as thinking it is a full blown GIS workspace, it doesn’t have geodatabase behaviors like support for editing. What it does it does well, let you move data around in a directly accessible and performant database.

GeoPackage is extensible, and there are approved OGC extensions for gridded tiles of elevation data and table relationships, and non-approved community extensions such as map styling of features, and storing vector tiles. ArcGIS Pro does not yet implement support for any GeoPackage extensions (excepting aspatial table functionality adopted in the v1.2 release).

What can you do reliably with a GeoPackage in ArcGIS?

– Share vector and raster data

– Use vector and raster data in read-only workflows

What can you do with limitations with a GeoPackage in ArcGIS?

– Perform Geoprocessing in Pro

– Manage table and feature class schemas in Pro

What can you not do with a GeoPackage in ArcGIS?

– Publish a GeoPackage item as a hosted web layer

– Share a layer referencing a GeoPackage as a hosted web layer

– Store or edit metadata

More on the limitations: Basically, if an analysis just reads GeoPackage data and creates an output in a Geodatabase, it should work. For example, Summary Statistics, Feature To Point, Polygon To Line work fine. Geoprocessing tools that make use of Geodatabase behavior may fail with GeoPackage data, for example Feature Class To Feature Class, Copy Features and Table to Table. You can add fields and calculate values with geoprocessing tools or arcpy, but you may find it slower than native Geodatabase operations. Geometry storage in a GeoPackage is not compressed like a geodatabase, so they can get big. The recommendation is to do your geoprocessing before creating your GeoPackage, then copy your data into it.

If Feature Class to Feature Class and Table to Table might fail how do you get your data into a GeoPackage? Firstly, get your data into the state you need it for sharing. Then move your data into the GeoPackage like this:

You can also use the copy/paste context menu behavior of the Catalog pane tree to move data into a GeoPackage.

Your GeoPackage is now ready for use!

Note on sharing: You can upload a .gpkg file to your portal or ArcGIS Online, the file type will be recognized. You can send a link after sharing the item and others can then download it from the content gallery.

Advanced topic: Because it is based on SQLite, GeoPackage comes with a database engine and good SQL language support. There are 3rd party tools for working with SQLite which you may find useful, but to include a spatial component in your work the ArcGIS Data Interoperability or Safe Software FME products support scripting SELECT, CREATE, DROP, DUPLICATE, TRUNCATE and CROSS JOIN statements within Spatial ETL tool transformers like SQLCreator and SQLExecutor. This approach enables very powerful and performant use of a GeoPackage.

About the authors

Product marketer. Map lover. Hello Kitty uber-fan.


Article Discussion:

Leave a Reply

Please Login to comment
newest oldest
Andrew Thompson
Andrew Thompson

That’s odd. QGIS enables full editing of geopackages. It’s not an inherent flaw of geopackages, just a feature ESRI hasn’t yet enabled.

Sindile Bidla
Sindile Bidla

The statement about geopackage not supporting editing is not true, rather it is ArcGIS Pro that does not support this feature. Here is a quote from the document Geopackage Encoding Standard referred to in the article – “Since a GeoPackage is a database container, it supports direct use. This means that data in a GeoPackage can be accessed and updated in a “native” storage format without intermediate format translations. “

Next Article

What's New in Collector for ArcGIS (March 2020)

Read this article