ArcGIS Blog

Data Management

ArcGIS Pro

How to Use OGC GeoPackages in ArcGIS Pro

By Bruce Harold and Dorothy Ho

This blog has been updated to reflect new functionalities in ArcGIS Pro 2.6.

Everyone likes SQLite. It is a single portable file, performs and scales well, supports enough SQL to be useful and has a DB-API compliant Python module and API access in other languages. It is embedded in many mobile and desktop apps, and is directly usable in ArcGIS Pro.

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 on the OGC website.

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 use it. 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 domains and attribute rules. What it does, it does well.

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 table functionality adopted in the v1.2 release).

What can you do with a GeoPackage in ArcGIS Pro 2.6?

  • Read and write simple features (polygons, polylines, points, multipoints, circular arcs, tables)
  • Create feature classes with the Feature Class to Feature Class tool
  • Create tables with the Table to Table tool
  • Use Copy/Paste in the Catalog pane
  • Use the Append tool to add data to an existing feature class or table
  • Use the Add Raster To Geopackage tool to store imagery
  • Edit features or rows with the ability to undo and redo edits
  • Modify the schema
  • Geoprocess with any tool that takes a simple feature class or table as input
  • Share GeoPackage data with other users as a static item in ArcGIS Online
  • Use Geopackage vector and raster data in map workflows
  • Read or write GeoPackage in Data Interoperability ETL workflows
  • Use SQL statements in SQLite’s native dialect

What can you not do with a GeoPackage in ArcGIS Pro 2.6?

  • Publish a GeoPackage item as a hosted web layer
  • Store or edit metadata
  • Use any geoprocessing tool that requires geodatabase output

Some recommendations: 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. Do your geoprocessing before creating your GeoPackage, then copy your data into it. Think of GeoPackage as a sharing format.

Move your data into the GeoPackage like this:

  • Create a GeoPackage with the Create SQLite Workspace tool (using the GeoPackage spatial type)
  • Use the Copy tool (Data Management, General toolset) to add vector data
  • Use the Add Raster to GeoPackage tool (Conversion, To GeoPackage toolset) to add raster mosaics

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.

Share this article

Subscribe
Notify of
5 Comments
Oldest
Newest
Inline Feedbacks
View all comments