Click or drag to resize

Geodatabase Class

Represents an ArcGIS Geodatabase.
Inheritance Hierarchy

Namespace:  Esri.ArcGISRuntime.Data
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.11.0
public sealed class Geodatabase

The Geodatabase type exposes the following members.

Public propertyGenerateGeodatabaseExtent Obsolete.
Gets the Envelope used to generate the sync enabled geodatabase.
Public propertyGenerateGeodatabaseGeometry
Gets the geometry (for example an Envelope or Polygon) used to generate a sync enabled geodatabase.
Public propertyGeodatabaseAnnotationTables
Gets the collection of GeodatabaseFeatureTable from the database that contain annotation features.
Public propertyCode exampleGeodatabaseFeatureTables
Gets the collection of GeodatabaseFeatureTable available in the database.
Public propertyCode exampleIsInTransaction
Get a value indicating whether a transaction is active on the geodatabase.
Public propertyMinServerGeneration
Gets or sets the minimum server generation number for the geodatabase.
Public propertyCode examplePath
Gets the path to the database.
Public propertySource
Gets the ArcGIS REST feature service endpoint.
Public propertySyncId
Gets the sync ID of the geodatabase.
Public propertySyncModel
Gets the SyncModel used to generate the geodatabase.
Public propertyUtilityNetworks
Gets the UtilityNetwork objects that are packaged within the Geodatabase.
Public methodCode exampleBeginTransaction
Starts a transaction on the geodatabase.
Public methodClose
Close a geodatabase.
Public methodCode exampleCommitTransaction
Commits the current transaction on the geodatabase.
Public methodGeodatabaseAnnotationTable(Int64)
Returns the GeodatabaseFeatureTable containing annotation features from the geodatabase, that corresponds to the specified service layer ID.
Public methodCode exampleGeodatabaseAnnotationTable(String)
Returns the GeodatabaseFeatureTable containing annotation features that corresponds to the specified table name.
Public methodGeodatabaseFeatureTable(Int64)
Returns the GeodatabaseFeatureTable that corresponds to the specified service layer ID.
Public methodCode exampleGeodatabaseFeatureTable(String)
Returns the GeodatabaseFeatureTable that corresponds to the specified table name.
Public methodGetUtilityNetwork
Gets a UtilityNetwork from the geodatabase with the specified utility network name.
Public methodHasLocalEdits
Returns a value indicating whether database has local edits.
Public methodIsSyncEnabled
Returns a value indicating sync is enabled for the database.
Public methodStatic memberCode exampleOpenAsync
Opens a Geodatabase at the specified path.
Public methodCode exampleRollbackTransaction
Rollback the current transaction on the geodatabase.
Public eventCode exampleTransactionStatusChanged
Occurs when a transaction starts or ends (either committed or rolled back).


Example Name: FeatureLayerDictionaryRenderer

Convert features into graphics to show them with mil2525d symbols.

Code example screen shot.

// Copyright 2017 Esri.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
// language governing permissions and limitations under the License.

using System;
using System.Windows;
using ArcGISRuntime.Samples.Managers;
using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Geometry;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Symbology;

namespace ArcGISRuntime.WPF.Samples.FeatureLayerDictionaryRenderer
        name: "Dictionary renderer with feature layer",
        category: "Layers",
        description: "Convert features into graphics to show them with mil2525d symbols.",
        instructions: "Pan and zoom around the map. Observe the displayed military symbology on the map.",
        tags: new[] { "military", "symbol" })]
    [ArcGISRuntime.Samples.Shared.Attributes.OfflineData("c78b149a1d52414682c86a5feeb13d30", "e0d41b4b409a49a5a7ba11939d8535dc")]
    public partial class FeatureLayerDictionaryRenderer
        public FeatureLayerDictionaryRenderer()

            // Setup the control references and execute initialization

        private async void Initialize()
            // Create new Map with basemap
            Map myMap = new Map(BasemapStyle.ArcGISTopographic);

            // Provide Map to the MapView
            MyMapView.Map = myMap;

            // Get the path to the geodatabase
            string geodbFilePath = GetGeodatabasePath();

            // Load the geodatabase from local storage
            Geodatabase baseGeodatabase = await Geodatabase.OpenAsync(geodbFilePath);

            // Get the path to the symbol dictionary
            string symbolFilepath = GetStyleDictionaryPath();

                // Load the symbol dictionary from local storage
                DictionarySymbolStyle symbolStyle = await DictionarySymbolStyle.CreateFromFileAsync(symbolFilepath);

                // Add geodatabase features to the map, using the defined symbology
                foreach (FeatureTable table in baseGeodatabase.GeodatabaseFeatureTables)
                    // Load the table
                    await table.LoadAsync();

                    // Create the feature layer from the table
                    FeatureLayer myLayer = new FeatureLayer(table);

                    // Load the layer
                    await myLayer.LoadAsync();

                    // Create a Dictionary Renderer using the DictionarySymbolStyle
                    DictionaryRenderer dictRenderer = new DictionaryRenderer(symbolStyle);

                    // Apply the dictionary renderer to the layer
                    myLayer.Renderer = dictRenderer;

                    // Add the layer to the map

                // Create geometry for the center of the map
                MapPoint centerGeometry = new MapPoint(-13549402.587055, 4397264.96879385, SpatialReference.Create(3857));

                // Set the map's viewpoint to highlight the desired content
                MyMapView.SetViewpoint(new Viewpoint(centerGeometry, 201555));
            catch (Exception e)
                MessageBox.Show(e.ToString(), "Error");

        // Get the file path for the style dictionary
        private static string GetStyleDictionaryPath()
            return DataManager.GetDataFolder("c78b149a1d52414682c86a5feeb13d30", "mil2525d.stylx");

        // Get the file path for the geodatabase
        private static string GetGeodatabasePath()
            return DataManager.GetDataFolder("e0d41b4b409a49a5a7ba11939d8535dc", "militaryoverlay.geodatabase");
    d:DesignHeight="300" d:DesignWidth="300">
        <esri:MapView Name="MyMapView" />
See Also
Additional Examples
Hyperlink to ExampleDescription
EditAndSyncFeaturesSynchronize offline edits with a feature service.
EditFeatureLinkedAnnotationEdit feature attributes which are linked to annotation through an expression.
FeatureLayerDictionaryRendererConvert features into graphics to show them with mil2525d symbols.
FeatureLayerGeodatabaseDisplay features from a local geodatabase.
GenerateGeodatabaseGenerate a local geodatabase from an online feature service.
GeodatabaseTransactionsUse transactions to manage how changes are committed to a geodatabase.