How to create offline geodatabase?

1764
7
04-20-2018 05:01 AM
VijitWadhwa
New Contributor III

How can I add features to a basemap and then convert that features into geodatabase file without using online service ? I am unable to understand the exact procedure. I am working for a disconnected environment. Should i draw graphics on the map and then convert into features ? or we can directly add features and create a geodatabase?MBranscomb-esristaffakajanus-esristaffmnielsen-esristaff

Thanks in advance

0 Kudos
7 Replies
JoeHershman
MVP Regular Contributor

It depends on what you are trying to do with this offline feature.  Do you just want something you can persist offline?  Or are you trying to create features that you want to send back to your enterprise geaodatabase

Thanks,
-Joe
VijitWadhwa
New Contributor III

Sir, I am new to this SDK , Can you help me with both the ways i.e persisting offline( creating a geodatabase offline ) and by using enterprise geodatabase ?

0 Kudos
JoeHershman
MVP Regular Contributor

Have you worked through all the samples.  The development team has put together a great set of sample code on-line and you can download the entire sample code from github.

Sample Code—ArcGIS Runtime SDK for .NET Samples | ArcGIS for Developers 

Here is an example of creating an offline geodatabase

Generate geodatabase—ArcGIS Runtime SDK for .NET Samples | ArcGIS for Developers 

and edit and sync

Edit and sync features—ArcGIS Runtime SDK for .NET Samples | ArcGIS for Developers 

Thanks,
-Joe
0 Kudos
VijitWadhwa
New Contributor III

Hi , sir I have gone through the sample , but in the code , it uses online

feature service to generate the geodatabase . . How can this be done

without itnernet connection , or in a complete offline mode ??

0 Kudos
JoeHershman
MVP Regular Contributor

You cannot create an offline replica database in code.  The database is always associated to a service and needs to initially be created from that service, either in Runtime code or directly from the ArcGIS Server Rest API [Create Replica—ArcGIS REST API: Services Directory | ArcGIS for Developers ] (the Runtime is basically a wrapper that simplifies making the API calls).  Once you have this initial offline database it can then be shared.  This type of approach is known as a pre-planned workflow.  Once you have this offline replica the process of adding features is basically identical to adding features to a service, except the source of the table is a GeodatabaseFeatureTable instead of a ServiceFeatureTable.  This sample goes through opening a offline database and adding a feature

Geodatabase transactions—ArcGIS Runtime SDK for .NET Samples | ArcGIS for Developers 

This links gives an overview of the different patterns and some links to more detailed information

Create an offline layer—ArcGIS Runtime SDK for .NET (WPF) | ArcGIS for Developers 

There is a FeatureCollection table which would allow you to create a table and load features into it.  This is an in memory object, so can really only be as a way to store data and add to a map for a given session.  There is not a way to create a database that you could store this.

FeatureCollectionTable Class 

Thanks,
-Joe
0 Kudos
VijitWadhwa
New Contributor III

Hi,

Sir , what if i create en empty geodatabase file from Arc Map and then add features to it to persist it offline ?? Is it possible sir??

Thanks in advance 

0 Kudos
VijitWadhwa
New Contributor III

Can we add edit features to a .geodatabase offline , without using any feature service ?? in a completely disconnected mode ??MBranscomb-esristaffakajanus-esristaffmnielsen-esristaff‌?? thanks in advance

0 Kudos