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.

2
  • 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, 2019 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, 2019 at 1:43

2 Answers 2

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.

2
  • 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, 2019 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, 2019 at 2:09
0

ArcGIS 'support' for geopackages is - vague and a bit limited. Unfortunately I have been down this path and encountered too many issues to reasonably suggest that ArcGIS and Geopackages will exist to a level which would allow them to totally replace proprietary ESRI file formats.

Needless to say, it looks like ArcGIS does not populate the metadata tables of a geopackage.

A couple of things to test this.

  • Create a geopackage file outside of ArcGIS - Open this using ArcGIS - Is the metadata visible? If not, then its an issue with ArcGIS reading the internal tables that geopackages use to store its own metadata. I suspect that this is the case.

Additionally, use DB Browser for SQL to check your gpkg file - The table gpkg_extensions should have a record called 'gpkg_metadata' - The metadata is a geopackage extension and needs to be configured before use. This MIGHT solve your problem from within ArcGIS see here for more details http://www.geopackage.org/guidance/extensions/metadata.html

Additionally to that, with regards to QGIS - it doesn't natively support ESRI metadata format. QGIS has its own metadata style. There may be a plugin that is available which allows for the importing of a metadata record against a layer, try the QGIS Metatools Plugin - Ive used it before, but not for File GDB.

QGIS Support for metadata is equal to ArcGIS - but only if you are using QGIS 'supported' datasets.

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.