Click or drag to resize

GeodatabaseFeatureTable Class

Represents a local ArcGIS Geodatabase table.
Inheritance Hierarchy

Namespace:  Esri.ArcGISRuntime.Data
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.7.0.0
Syntax
C#
public sealed class GeodatabaseFeatureTable : ArcGISFeatureTable

The GeodatabaseFeatureTable type exposes the following members.

Constructors
  NameDescription
Public methodGeodatabaseFeatureTable
Initializes a new instance of the GeodatabaseFeatureTable class.
Top
Properties
  NameDescription
Public propertyDefaultSubtypeCode
Gets the table's default subtype code.
(Inherited from ArcGISFeatureTable.)
Public propertyDisplayName
Gets or sets the table's display name.
(Inherited from FeatureTable.)
Public propertyEditableAttributeFields
Gets the editable fields of this feature table.
(Inherited from ArcGISFeatureTable.)
Public propertyCode exampleExtent
Gets the geographic extent of features within the table.
(Inherited from FeatureTable.)
Public propertyFeatureLayer
Gets the FeatureLayer this table is associated with, or created from, if any.
(Inherited from FeatureTable.)
Public propertyFeatureSubtypes
Gets a list of FeatureSubtype of this feature table.
(Inherited from ArcGISFeatureTable.)
Public propertyFeatureTemplates
Gets a list of FeatureTemplate of this feature table.
(Inherited from ArcGISFeatureTable.)
Public propertyFeatureTypes
Gets a list of FeatureType of this feature table.
(Inherited from ArcGISFeatureTable.)
Public propertyCode exampleFields
Gets the fields of the feature table.
(Inherited from FeatureTable.)
Public propertyGeodatabase
Gets the Geodatabase associated with this table.
Public propertyCode exampleGeometryType
Gets the GeometryType of features in this table.
(Inherited from FeatureTable.)
Public propertyGlobalIdField
Gets the name of the global ID field.
(Inherited from ArcGISFeatureTable.)
Public propertyHasAttachments
Gets a value indicating whether table supports attachments.
(Inherited from ArcGISFeatureTable.)
Public propertyHasGeometry
Gets a value indicating whether this table has geometry data.
(Inherited from FeatureTable.)
Public propertyHasM
Gets a value indicating whether the shapefile geometries have M values.
(Inherited from FeatureTable.)
Public propertyHasZ
Gets a value indicating whether the shapefile geometries have Z values.
(Inherited from FeatureTable.)
Public propertyIsEditable
Gets a value indicating whether this table is editable.
(Inherited from FeatureTable.)
Public propertyIsPopupEnabled
Gets or sets a value indicating whether the PopupDefinition defined is enabled.
(Inherited from FeatureTable.)
Public propertyLayer
Gets the layer this table is associated with, or created from, if any.
(Inherited from FeatureTable.)
Public propertyCode exampleLayerInfo
Gets the ArcGISFeatureLayerInfo of this feature table.
(Inherited from ArcGISFeatureTable.)
Public propertyLoadError
Gets the exception associated with a failed load. This property remains null if load is successful.
(Inherited from FeatureTable.)
Public propertyCode exampleLoadStatus
Gets the current load status.
(Inherited from FeatureTable.)
Public propertyNumberOfFeatures
Gets the number of features in this table.
(Inherited from FeatureTable.)
Public propertyObjectIdField
Gets the name of the object ID field.
(Inherited from ArcGISFeatureTable.)
Public propertyPopupDefinition
Gets or sets the pop-up definition for the table.
(Inherited from FeatureTable.)
Public propertyCode exampleServiceLayerId
Returns the layer ID in the feature service that this table was created from.
(Inherited from ArcGISFeatureTable.)
Public propertySpatialReference
Gets the SpatialReference of this table.
(Inherited from FeatureTable.)
Public propertySubtypeField
Gets the table's subtype field.
(Inherited from ArcGISFeatureTable.)
Public propertyCode exampleTableName
Gets the name of the table.
(Inherited from FeatureTable.)
Public propertyTypeIdField
Gets the name of the type ID field.
(Inherited from ArcGISFeatureTable.)
Public propertyUseAdvancedSymbology
Gets or sets a value indicating whether advanced symbology is used.
(Inherited from ArcGISFeatureTable.)
Top
Methods
  NameDescription
Public methodCode exampleAddFeatureAsync
Asynchronously adds new Feature to the table.
(Inherited from FeatureTable.)
Public methodAddFeaturesAsync
Asynchronously adds the set of Features to the table.
(Inherited from FeatureTable.)
Public methodCanAdd
Determines if a feature can be added to the table.
(Inherited from FeatureTable.)
Public methodCancelLoad
Cancel the previous load operation,
(Inherited from FeatureTable.)
Public methodCanDelete
Determines if the specified Feature can be deleted from the table.
(Inherited from FeatureTable.)
Public methodCanEditGeometry
Determines if the table allows for the geometry field to be modified.
(Inherited from FeatureTable.)
Public methodCanUpdate
Determines if the specified Feature can be updated on the table.
(Inherited from FeatureTable.)
Public methodCode exampleCreateFeature
Creates a new feature.
(Inherited from FeatureTable.)
Public methodCreateFeature(FeatureSubtype)
Creates and returns a new ArcGISFeature based on the specified FeatureSubtype.
(Inherited from ArcGISFeatureTable.)
Public methodCreateFeature(FeatureTemplate)
Creates and returns a new ArcGISFeature based on the specified FeatureTemplate.
(Inherited from ArcGISFeatureTable.)
Public methodCreateFeature(FeatureType)
Creates and returns a new ArcGISFeature based on the specified FeatureType.
(Inherited from ArcGISFeatureTable.)
Public methodCreateFeature(IEnumerableKeyValuePairString, Object, Geometry)
Creates a new feature with specified attributes and geometry.
(Inherited from FeatureTable.)
Public methodCreateFeature(FeatureSubtype, Geometry)
Creates and returns a new ArcGISFeature based on the specified FeatureSubtype and Geometry.
(Inherited from ArcGISFeatureTable.)
Public methodCreateFeature(FeatureTemplate, Geometry)
Creates and returns a new ArcGISFeature based on the specified FeatureTemplate and Geometry.
(Inherited from ArcGISFeatureTable.)
Public methodCreateFeature(FeatureType, Geometry)
Creates and returns a new ArcGISFeature based on the specified FeatureType and Geometry.
(Inherited from ArcGISFeatureTable.)
Public methodCode exampleDeleteFeatureAsync
Asynchronously deletes new Feature from the table.
(Inherited from FeatureTable.)
Public methodDeleteFeaturesAsync
Asynchronously deletes the set of Features from the table.
(Inherited from FeatureTable.)
Public methodGetAddedFeaturesAsync
Retrieves the features added since the last sync.
(Inherited from ArcGISFeatureTable.)
Public methodGetAddedFeaturesCountAsync
Retrieves the number of features added since the last sync.
(Inherited from ArcGISFeatureTable.)
Public methodGetDeletedFeaturesAsync
Retrieves the features deleted since the last sync.
(Inherited from ArcGISFeatureTable.)
Public methodGetDeletedFeaturesCountAsync
Retrieves the number of features deleted since the last sync.
(Inherited from ArcGISFeatureTable.)
Public methodGetFeatureTemplate
Retrieves the FeatureTemplate associated with the specified feature template name.
(Inherited from ArcGISFeatureTable.)
Public methodGetFeatureType
Retrieves the FeatureType associated with the specified feature type name.
(Inherited from ArcGISFeatureTable.)
Public methodGetField
Gets the associated Field with specified field name.
(Inherited from FeatureTable.)
Public methodGetRelatedTables
Returns a list of all related tables that have been added to the map.
(Inherited from ArcGISFeatureTable.)
Public methodGetRelatedTables(RelationshipInfo)
Returns list of tables related by the given relationship info.
(Inherited from ArcGISFeatureTable.)
Public methodGetUpdatedFeaturesAsync
Retrieves the features updated since the last sync. This set of features exists on server but were updated locally and have not yet been submitted to server.
(Inherited from ArcGISFeatureTable.)
Public methodGetUpdatedFeaturesCountAsync
Retrieves the number of features updated since the last sync.
(Inherited from ArcGISFeatureTable.)
Public methodHasLocalEditsSince
Returns a value indicating whether local edits were made since the specified date.
Public methodCode exampleLoadAsync
Asynchronously initiates loading of this table.
(Inherited from FeatureTable.)
Public methodCode exampleQueryExtentAsync
Asynchronously queries the extent of all features that satisfy the provided parameters.
(Inherited from FeatureTable.)
Public methodCode exampleQueryFeatureCountAsync
Asynchronously queries the count of all features that satisfy the provided parameters.
(Inherited from FeatureTable.)
Public methodCode exampleQueryFeaturesAsync(QueryParameters)
Asynchronously performs query against the table.
(Inherited from FeatureTable.)
Public methodQueryFeaturesAsync(QueryParameters, CancellationToken)
Asynchronously performs query against the table.
(Inherited from FeatureTable.)
Public methodQueryRelatedFeatureCountAsync(ArcGISFeature)
Asynchronously queries for the number of related features to the supplied feature.
(Inherited from ArcGISFeatureTable.)
Public methodQueryRelatedFeatureCountAsync(ArcGISFeature, RelatedQueryParameters)
Asynchronously queries for the number of related features to the supplied feature based on the parameters.
(Inherited from ArcGISFeatureTable.)
Public methodCode exampleQueryRelatedFeaturesAsync(ArcGISFeature)
Asynchronously queries for related features of a given feature in all relationships.
(Inherited from ArcGISFeatureTable.)
Public methodCode exampleQueryRelatedFeaturesAsync(ArcGISFeature, RelatedQueryParameters)
Asynchronously queries for related features of a given feature in a specific relationship.
(Inherited from ArcGISFeatureTable.)
Public methodCode exampleQueryStatisticsAsync
Calculates values for the requested statistics.
(Inherited from FeatureTable.)
Public methodRetryLoadAsync
Asynchronously retries loading of this table table.
(Inherited from FeatureTable.)
Public methodCode exampleUpdateFeatureAsync
Asynchronously updates new Feature on the table.
(Inherited from FeatureTable.)
Public methodUpdateFeaturesAsync
Asynchronously updates the set of Features on the table.
(Inherited from FeatureTable.)
Public methodValidateRelationshipConstraintsAsync
Asynchronously validates constraints for a given feature participating in a relationship. In a composite relationship, adding an orphan feature to the destination table without relating it to an origin feature. Cardinality Violations: In 1:1 relationships, if an origin feature is already related to a destination feature, relating another feature to either of them. In 1:n relationships, relating a destination feature to more than one origin feature. To recover from an orphaned destination feature violation, simply relate it to a valid origin feature. You can usually recover from a cardinality violation by unrelating the appropriate features. Also, see UnrelateFeature(ArcGISFeature) Note that edit operations do not error when there are constraint violations. This allows you to recover from violations in a back office operation after applying edits or syncing, if you choose to do so. See ArcGIS Desktop Validate Features process here. Note: This method makes network calls to query for the related features if they are not present locally.
(Inherited from ArcGISFeatureTable.)
Top
Events
  NameDescription
Public eventCode exampleLoaded
Occurs when the table is loaded.
(Inherited from FeatureTable.)
Public eventCode exampleLoadStatusChanged
Occurs when the table LoadStatus is changed.
(Inherited from FeatureTable.)
Public eventPropertyChanged
Occurs when a property value changes.
(Inherited from FeatureTable.)
Top
Examples

Android

Example Name: FeatureLayerDictionaryRenderer

Convert features into graphics to show them with mil2525d symbols.

Code example screen shot.

C#
// 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: http://www.apache.org/licenses/LICENSE-2.0
// 
// 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 Android.App;
using Android.OS;
using Android.Widget;
using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Geometry;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Symbology;
using Esri.ArcGISRuntime.UI.Controls;
using ArcGISRuntime.Samples.Managers;

namespace ArcGISRuntime.Samples.FeatureLayerDictionaryRenderer
{
    [Activity (ConfigurationChanges=Android.Content.PM.ConfigChanges.Orientation | Android.Content.PM.ConfigChanges.ScreenSize)]
    [ArcGISRuntime.Samples.Shared.Attributes.OfflineData("c78b149a1d52414682c86a5feeb13d30", "e0d41b4b409a49a5a7ba11939d8535dc")]
    [ArcGISRuntime.Samples.Shared.Attributes.Sample(
        "Feature layer dictionary renderer",
        "Layers",
        "Demonstrates how to apply a dictionary renderer to a feature layer and display mil2525d graphics. The dictionary renderer creates these graphics using a mil2525d style file and the attributes attached to each feature within the geodatabase.",
        "",
        "Military", "Symbology", "Military symbology")]
    public class FeatureLayerDictionaryRenderer : Activity
    {
        // Hold a reference to the map view
        private MapView _myMapView;

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Title = "Feature layer dictionary renderer";

            // Create the UI, setup the control references and execute initialization
            CreateLayout();
            Initialize();
        }

        private void CreateLayout()
        {
            // Create a new vertical layout for the app
            LinearLayout layout = new LinearLayout(this) { Orientation = Orientation.Vertical };

            // Add the map view to the layout
            _myMapView = new MapView(this);
            layout.AddView(_myMapView);

            // Show the layout in the app
            SetContentView(layout);
        }

        private async void Initialize()
        {
            // Create new Map with basemap
            Map myMap = new Map(Basemap.CreateTopographic());

            // 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();

            try
            {
                // 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
                    myMap.OperationalLayers.Add(myLayer);
                }

                // 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)
            {
                new AlertDialog.Builder(this).SetMessage(e.ToString()).SetTitle("Error").Show();
            }
        }

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

        // Get the file path for the geodatabase
        private string GetGeodatabasePath()
        {
            return DataManager.GetDataFolder("e0d41b4b409a49a5a7ba11939d8535dc", "militaryoverlay.geodatabase");
        }
    }
}
Examples

Xamarin Forms Android

Example Name: FeatureLayerDictionaryRenderer

Convert features into graphics to show them with mil2525d symbols.

Code example screen shot.

C#
// 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: http://www.apache.org/licenses/LICENSE-2.0
// 
// 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 ArcGISRuntime.Samples.Managers;
using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Geometry;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Symbology;
using Xamarin.Forms;

namespace ArcGISRuntime.Samples.FeatureLayerDictionaryRenderer
{
    [ArcGISRuntime.Samples.Shared.Attributes.Sample(
        "Feature layer dictionary renderer",
        "Layers",
        "Demonstrates how to apply a dictionary renderer to a feature layer and display mil2525d graphics. The dictionary renderer creates these graphics using a mil2525d style file and the attributes attached to each feature within the geodatabase.",
        "",
        "Military", "Symbology", "Military symbology")]
    [ArcGISRuntime.Samples.Shared.Attributes.OfflineData("c78b149a1d52414682c86a5feeb13d30", "e0d41b4b409a49a5a7ba11939d8535dc")]
    public partial class FeatureLayerDictionaryRenderer : ContentPage
    {
        public FeatureLayerDictionaryRenderer()
        {
            InitializeComponent();

            // Setup the control references and execute initialization
            Initialize();
        }

        private async void Initialize()
        {
            // Create new Map with basemap
            Map myMap = new Map(Basemap.CreateTopographic());

            // 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();

            try
            {
                // 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
                    myMap.OperationalLayers.Add(myLayer);
                }

                // 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)
            {
                await Application.Current.MainPage.DisplayAlert("Error", e.ToString(), "OK");
            }
        }

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

        // Get the file path for the geodatabase
        private string GetGeodatabasePath()
        {
            return DataManager.GetDataFolder("e0d41b4b409a49a5a7ba11939d8535dc", "militaryoverlay.geodatabase");
        }
    }
}
XAML
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms"
             x:Class="ArcGISRuntime.Samples.FeatureLayerDictionaryRenderer.FeatureLayerDictionaryRenderer"
             Title="Feature layer dictionary renderer">
    <esriUI:MapView x:Name="MyMapView" />
</ContentPage>
See Also
Additional Examples
Hyperlink to ExampleDescription
EditAndSyncFeaturesSynchronize offline edits with a feature service.
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.
GeodatabaseTransactionsThis sample demonstrates how to manage edits to a local geodatabase inside of transactions.