Select to view content in your preferred language

Writing to geopackage

981
3
Jump to solution
07-08-2020 09:50 PM
by Anonymous User
Not applicable

Are there any plans to support editing features to GeoPackage feature tables in the QML api with the Qt runtime in the future?

We have a client who is wanting to supply geopackages as an input which would then be edited with features added, updated or deleted, then the GeoPackage file returned to them with the edited data in it.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

Hey Paul - this should be possible now - features can be added/updated/deleted.

View solution in original post

0 Kudos
3 Replies
LucasDanzinger
Esri Frequent Contributor

Hey Paul - this should be possible now - features can be added/updated/deleted.

0 Kudos
by Anonymous User
Not applicable

Hmmmm, thanks Luke.

In which case, I assume there must be either something wrong with the GeoPackage samples we were testing, or the code. In our testing, the feature tables all return "editable" as false and attempts to add a feature don't display anything.

Are you aware of any samples (with data if possible) that work? And/or any samples that demonstrate creating a valid empty GeoPackage within the app?

0 Kudos
by Anonymous User
Not applicable

Soooo, yes it is possible to edit.

As usual, there was more than one issue muddying the waters during our testing - some of the geopackages we were testing weren't proper geopackages (were sqlite db's but missing necessary specs) plus there was a bug in the code creating the feature which prevented it from saving properly. On top of that was the featureTable.editable being false which turns out to be a bit of a red herring as it's technically incorrect - perhaps something for the runtime devs to double check?

For anyone else interested, I found this example in the Qt runtime samples, which has a link to a sample GeoPackage hosted in ArcGIS Online. The example code focuses on raster layers, but the GeoPackage has normal vector layers which you can load and play with.

arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_QMLSamples/Layers/RasterLayerGeoPackage at master · Esr... 

0 Kudos