Select to view content in your preferred language

make it possible to add fields to gpkg and use tools that add fields with gpkg

251
5
Thursday
Status: Already Offered
Labels (1)
CordulaGöke
Frequent Contributor

At the moment, there are limitations on what is possible with .gpkg files.  I cannot add columns or use tools that add columns. The tools do not indicate that they won't work with gpkg.

This is an idea on request of @SSWoodward  to split my orinal idea "full support of gpkg" into more clearly defined sub-ideas. https://community.esri.com/t5/arcgis-pro-ideas/full-functionality-for-gpkg-in-arcgis-pro/idi-p/14915...

5 Comments
Joshua-Young

I have noticed this in ArcGIS Pro 3.5.7, you can add fields and use tools that add fields when interacting with feature classes in a Geopackage in the Catalog Pane or Catalog View. Interacting with a feature class in a Geopackage through a Map treats the feature class as read-only (a warning is visible when trying to add a field through the Contents Pane).

SSWoodward
Status changed to: Already Offered

Users are able to use GP tools and the Fields Data Design View to add fields to classes and tables in a Geopackage. 

@Joshua-Young, when users add data to as map that is sourced from a Geopackage, the data is added to the map as a query layer, the same as many other non-geodatabase data sources.  Query Layers are read-only and do not support direct schema changes regardless of the data source. 

Users must act on the source feature class or table, and not on a query layer in a map to access this functionality. 

CordulaGöke
@SSWoodward
 

What I want is not offered as you write yourself it is read only in the map (which is not totally true, you can edit values). Maybe my suggestion is not possible, but "already offered" is wrong. It is not offered for e.g. calculate field when you add column and calculate in one step or extract multi values to points. So at least the tool interface should indicate that it is not possible to use the tool, like if you would try to use a raster layer as "input point features". I just tried again, to be sure I refer to the correct tool, and today it even destroyed my gpkg.


 

 
Joshua-Young

@CordulaGöke in ArcGIS Pro 3.5.7 I just used model builder to select some points in a geopackage and ran the Calculate Field tool on that selection putting the results in a new field. The process was:

  1. Make Feature Layer - input was the point feature class in the geopackage
  2. Select Layer by Attribute
  3. Calculate Field - typed in a new field name to store the results

I tried the Multi Values to Points tool but it would not let me use point feature class in a geopackage as the input. Doing so generated an error that the file was not supported. I tried to get around that by using Make Feature Layer first. The Multi Values to Points did run after that but failed with an error and the point feature class was deleted from the geopackage.

I also tried Extract Values to Points but if I try to put the output in a geopackage it keeps appending ".shp" to the end of the output name and there is no way to remove it. Running the tool obviously generates an error. Running the Extract Values to Points tool with the input points coming from a geopackage and the results being stored in a file geodatabase works.

I would recommend opening a support ticket for the Multi Values to Points and Extract Values to Points tools failing to output data to a geopackage. The Multi Values to Points tool overwrites the input points file, so if it is trying to save the new points as a shapefile inside a geopackage that would explain the table being deleted.

SSWoodward

@CordulaGöke 

Can you share the exact workflow you are using for calculate field that is not succeeding?  I have done some basic test cases with both a gpkg based feature layer and feature class as input to confirm and both cases succeed when adding a new field and calculating its value. 

I can reproduce the issue you are seeing with Extract Multi Value to Points GP tool when targeting a point feature feature layer sourced from a geopackage.  Looks like the tool makes a newly named copy of the original feature class and you end in an undesirable situation.  I have pinged the appropriate person to take a look at this bug.