Local database problem

4334
4
Jump to solution
03-13-2015 02:17 AM
KK2014
by
New Contributor III

I have local database like File geodatabase (*.gdb) or Personal geodatabase (*.mdb) and I can edit form ArcMap.I want to use these for editing but I can't display in my Qml/QT application.How can I display or use  these geodatabases or can I convert these geodatabases to "offlineSample.geodatabase like qml app examples?

Thanks

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

Hey KK,

The Runtime does not support these file formats. We support working with sqlite geodatabases with the .geodatabase file extension. There are 2 ways to create these. The first option is to load the data into ArcMap and use the "Create Runtime Content" GP tool. This will take your features and convert them to a runtime sqlite geodatabase. You can then edit features with this gdb. However, there is not a synchronizing tool at this point, so edits will not be able to be applied back to the file geodatabase.

The most common scenario for offline editing is where a user will publish a feature service (either on server or as a hosted feature service in ArcGIS Online/Portal) and set the Sync capabilities to true. You would then create a replica from the service, which would create a .geodatabase for you from the service. Once you do your edits, you can then apply those edits to the service, and the service will pick up any changes and save them to your enterprise geodatabase. Please see the "Local geodatabase editing" sample in the QML Sample app for more details about how to do this.

Thanks!

Luke

View solution in original post

4 Replies
LucasDanzinger
Esri Frequent Contributor

Hey KK,

The Runtime does not support these file formats. We support working with sqlite geodatabases with the .geodatabase file extension. There are 2 ways to create these. The first option is to load the data into ArcMap and use the "Create Runtime Content" GP tool. This will take your features and convert them to a runtime sqlite geodatabase. You can then edit features with this gdb. However, there is not a synchronizing tool at this point, so edits will not be able to be applied back to the file geodatabase.

The most common scenario for offline editing is where a user will publish a feature service (either on server or as a hosted feature service in ArcGIS Online/Portal) and set the Sync capabilities to true. You would then create a replica from the service, which would create a .geodatabase for you from the service. Once you do your edits, you can then apply those edits to the service, and the service will pick up any changes and save them to your enterprise geodatabase. Please see the "Local geodatabase editing" sample in the QML Sample app for more details about how to do this.

Thanks!

Luke

EricBader
Occasional Contributor III

Just to add, for C++, LocalServer can be used for simple editing of a featurelayer from a File Geodatabase in a Map Package. However, this is not the recommended pattern for editing features directly on the device going forward.

0 Kudos
KK2014
by
New Contributor III

Hi ,

The QML API can be used to edit features within an offline geodatabase and sync back to the service.When download a local geodatabase from the service, can I download only geometry areas (with poligon drawing ) which I draw from the map and then to create,delete or update features in local then send to server more fast. Is it posible in QML API ? or how can I solve the problem for more fast dowloading local geodatabse (for ex: download only drawing poligon part of the maps geodatabase not complete geodatabase).

Can I solve with this code below?

onClicked: {

    generateGeodatabaseParameters.initialize(serviceInfoTask.featureServiceInfo);
   
   //Can I solve with this red code below?
    generateGeodatabaseParameters.extent = mainMap.extent;//instead of mainMap.extent use geometry(draw polygon)
    generateGeodatabaseParameters.returnAttachments = false;
    statusText.text = "Starting generate geodatabase task";
   geodatabaseSyncTask.generateGeodatabase(generateGeodatabaseParameters, gdbPath);
    }

Thanks.

0 Kudos
LucasDanzinger
Esri Frequent Contributor

KK,

Your options for editing are to either generate an offline geodatabase, then edit, then sync, or to use the GeodatabaseFeatureServiceTable, and directly edit from the service. Note that with the GeodatabaseFeatureServiceTable, there is some local caching on your device that will happen automatically, so this will work in a "partially connected" scenario. If you are wanting to to the full offline workflow, you need to generate the full geodatabase from the server. The API basically just exposes the capabilities that you see from the REST page of your service. If you navigate to your service REST endpoint and click on create replica, you will see the same options- there isn't an option to return geometry only. If this is something you would like to see, you could either log an enhancement through support or on ideas.arcgis.com (enhancement would be for ArcGIS Server to allow you to specify outFields on create replica, or to have an option to return geometry only).

Hope this helps.

-Luke

0 Kudos