14

Is it possible to directly convert feature layers in ArcGIS to GeoPackage?

In ArcGIS Desktop 10.5's ArcToolbox, under "Conversion Tools/To Geopackage" the only option that appears to me is "Add Raster to GeoPackage". There is no "Add Features" or something alike.

In this blog post from almost 3 years ago, ESRI claimed that "At 10.2.1 or with 10.2.2 ArcGIS desktop, you can create an empty GeoPackage and populate the GeoPackage by copying feature data into it". However, I can't see how. In ArcCatalog, there is no option to create a GeoPackage file.

13

You are looking for a GP tool Create SQLite Database available since 10.4 (previously, in 10.3, you had to use an arcpy function CreateSQLiteDatabase().

Choose as spatial_type parameter GEOPACKAGE which will create an OGC GeoPackage dataset. This is essentially an SQLite database with ST_Geometry storage plus some extra OGC features.

You can use this workspace very much like any SQLite geodatabase, that is load/export feature classes and tables and create views. You can read more about support for SQLite in ArcGIS in this help topic SQLite and ArcGIS. To see an example of data load, look at this blog post Load Esri geodatabase tables into SQLite

  • 3
    I say this as someone who has advocated for use of SQLite in ArcGIS, but as a caution to those looking to use them - you can't edit features in a SQLite DB in ArcGIS yet. You can store layers there (and use them in geoprocessing), but it doesn't support editing attributes, or making changes to features in an existing feature class. There are lots of good reasons to use them still though! – nicksan May 5 '17 at 14:23
  • But you can edit the feature classes using SQL and even apply ST_Geometry spatial functions which is very neat. But for casual ArcGIS users, yes, this is pretty much read-only. – Alex Tereshenkov May 5 '17 at 17:12
  • According to comments in this older ESRI blog post, editing is supported via cursors or ArcObjects, just not via GUI tools: blogs.esri.com/esri/arcgis/2014/04/14/… – PhilippNagel Jan 17 '18 at 18:40
  • @AlexTereshenkov could you add more info for the "loading" step ? Creating the gpkg databaseis quite straightforward, but importing a feature class into it is not and the ESRI doc is not very helpful. I've found a script (from you?) that helps, but your answer would be much more helpfull if it was complete. If you don't have time, please let me know and i will try to add a complementary answer. – radouxju Mar 21 at 11:19
  • @radouxju, that was a long time ago, feels like this was a previous life :) I've posted a link to a blog post, not sure this would suffice - by all means, if you have something to add, go ahead, I'd be grateful! – Alex Tereshenkov Mar 22 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.