3

After much frustration reading vague documentation and getting obscure errors I managed to create a GeoPackage using ArcMap v10.6.1 and import features into it.

I was very happy until I discovered that no metadata is being imported along with the features. The GeoPackage is meant to be a modern replacement for shapefiles, but without metadata I can't use it.

Does anyone know how to get the metadata to transfer along with the features?

The procedure I use at the moment is:

  1. Create an empty .gpkg file using ArcToolbox > Data Management Tools > Workspace > Create SQLite Database, and selecting Spatial Type = GEOPACKAGE. This only needs to be done once as a copy of the empty .gpkg file can be made outside of ArcGIS whenever one is needed.

  2. Open the layer you want to convert to a GeoPackage

  3. In the catalog window, navigate to the .gpkg file, right-click, and select Import > Feature Class (single)..., which opens a dialog box.

  4. In the Input Features field, select the layer you want to convert. The Output Location field should already be populated with the still-empty .gpkg file. Enter an arbitrary name in the Output Feature Class field. Then click OK. A new window should appear showing the progress of the copy operation.

  5. If you get an unhelpful error saying it didn't succeed, check that you have at least standard (ArcEditor) licence activated. It doesn't work with the basic (ArcView) licence.

  6. Click the Close button once the operation is complete. Note that ArcMap keeps a lock on the .gpkg file meaning you can't move or do many other things with it until you close the ArcGIS application completely.

Now when I right-click the freshly created layer under the .gpgk file and select Item Description, I get an error saying "The item's XML contains errors" where the metadata should be.

This question had a bounty worth +50 reputation from Martin that ended yesterday. Grace period has ended

This question has not received enough attention.

  • Have you tried importing metadata from the source FeatureClass? In ArcCatalog go to the FeatureClass in the geopackage, view description, are there buttons at the top to edit/import? – Hornbydd May 13 at 16:55
  • 1
    @Hornbydd No the normal Print, Edit and Import buttons are not there. Only a big red message saying "The item's XML contains errors". – Martin May 14 at 1:43
1

There shouldn't be any metadata when you export to any database from ArcGIS. you can test this on other databases as well (checked this on MSSQL server and PostgreSQL).
ArcGIS stores it's metadata in XML files as you stated that do not exist in other formats.
Some of the base metadata it stores are just derived properties and some you can add yourself.

If you can live without metadata I would still recommend using the Geopackage format as it can replace both the shapefile and the Geodatabase formats and works on most other systems.
An easier way to use the Geopackage format would be with QGIS, you can use both software side by side.

  • Thanks for your response but I think you're mistaken on every point. When I export a layer to a file geodatabase it includes the metadata. Here's an example (2MB) wildwildweb.com.au/temp/basin.gdb.zip – Martin May 20 at 2:07
  • 1
    ArcGIS doesn't "store" metadata in XML, that is just an export format, and there are many different conventions for metadata in XML format. Shapefiles just happen to use XML format. File Geodatabases store the metadata in a .gdbtable file. GeoPackages contain a table called gpkg_metadata which is intended to store metadata, but this table is empty after exporting a layer into a Geopackage from ArcGIS. I haven't used the QGIS application much but it seems it has even less support for metadata than ArcGIS. For example if you open the linked File GDB with QGIS it doesn't find the metadata. – Martin May 20 at 2:09

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.