ShapefileFeatureTable Class |
Namespace: Esri.ArcGISRuntime.Data
The ShapefileFeatureTable type exposes the following members.
Name | Description | |
---|---|---|
![]() | ShapefileFeatureTable |
Initializes a new instance of the ShapefileFeatureTable class.
|
![]() ![]() | ShapefileFeatureTable(String) |
Initializes a new instance of the ShapefileFeatureTable class.
|
Name | Description | |
---|---|---|
![]() | DisplayName |
Gets or sets the table's display name.
(Inherited from FeatureTable.) |
![]() ![]() | Extent |
Gets the geographic extent of features within the table.
(Inherited from FeatureTable.) |
![]() | FeatureLayer | Obsolete.
Gets the FeatureLayer this table is associated with, or created from, if any.
(Inherited from FeatureTable.) |
![]() ![]() | Fields |
Gets the fields of the feature table.
(Inherited from FeatureTable.) |
![]() ![]() | GeometryType |
Gets the GeometryType of features in this table.
(Inherited from FeatureTable.) |
![]() | HasGeometry |
Gets a value indicating whether this table has geometry data.
(Inherited from FeatureTable.) |
![]() | HasM | Gets a value indicating whether the shapefile geometries have M values. (Inherited from FeatureTable.) |
![]() | HasZ | Gets a value indicating whether the shapefile geometries have Z values. (Inherited from FeatureTable.) |
![]() ![]() | Info | Gets the shapefile info. |
![]() | IsEditable |
Gets a value indicating whether this table is editable.
(Inherited from FeatureTable.) |
![]() | IsPopupEnabled |
Gets or sets a value indicating whether the PopupDefinition defined is enabled.
(Inherited from FeatureTable.) |
![]() | Layer | Gets the layer this table is associated with, or created from, if any. (Inherited from FeatureTable.) |
![]() | LoadError |
Gets the exception associated with a failed load. This property remains null if load is successful.
(Inherited from FeatureTable.) |
![]() ![]() | LoadStatus |
Gets the current load status.
(Inherited from FeatureTable.) |
![]() | NumberOfFeatures |
Gets the number of features in this table.
(Inherited from FeatureTable.) |
![]() | Path | Gets or sets the path to the shapefile |
![]() | PopupDefinition |
Gets or sets the pop-up definition for the table.
(Inherited from FeatureTable.) |
![]() | SpatialIndexEnabled | Gets a value indicating whether the shapefile uses spatial indexes. |
![]() | SpatialReference |
Gets the SpatialReference of this table.
(Inherited from FeatureTable.) |
![]() ![]() | TableName |
Gets the name of the table.
(Inherited from FeatureTable.) |
Name | Description | |
---|---|---|
![]() ![]() | AddFeatureAsync |
Asynchronously adds new Feature to the table.
(Inherited from FeatureTable.) |
![]() | AddFeaturesAsync |
Asynchronously adds the set of Features to the table.
(Inherited from FeatureTable.) |
![]() | CanAdd |
Determines if a feature can be added to the table.
(Inherited from FeatureTable.) |
![]() | CancelLoad |
Cancel the previous load operation,
(Inherited from FeatureTable.) |
![]() | CanDelete |
Determines if the specified Feature can be deleted from the table.
(Inherited from FeatureTable.) |
![]() | CanEditGeometry |
Determines if the table allows for the geometry field to be modified.
(Inherited from FeatureTable.) |
![]() | CanUpdate |
Determines if the specified Feature can be updated on the table.
(Inherited from FeatureTable.) |
![]() | Close |
Close a shapefile feature table.
|
![]() ![]() | CreateFeature |
Creates a new feature.
(Inherited from FeatureTable.) |
![]() | CreateFeature(IEnumerableKeyValuePairString, Object, Geometry) |
Creates a new feature with specified attributes and geometry.
(Inherited from FeatureTable.) |
![]() ![]() | DeleteFeatureAsync |
Asynchronously deletes new Feature from the table.
(Inherited from FeatureTable.) |
![]() | DeleteFeaturesAsync |
Asynchronously deletes the set of Features from the table.
(Inherited from FeatureTable.) |
![]() | GetField |
Gets the associated Field with specified field name.
(Inherited from FeatureTable.) |
![]() ![]() | LoadAsync |
Asynchronously initiates loading of this table.
(Inherited from FeatureTable.) |
![]() ![]() ![]() | OpenAsync |
Creates and initializes a ShapefileFeatureTable from a file path.
|
![]() ![]() | QueryExtentAsync | Asynchronously queries the extent of all features that satisfy the provided parameters. (Inherited from FeatureTable.) |
![]() ![]() | QueryFeatureCountAsync | Asynchronously queries the count of all features that satisfy the provided parameters. (Inherited from FeatureTable.) |
![]() ![]() | QueryFeaturesAsync(QueryParameters) |
Asynchronously performs query against the table.
(Inherited from FeatureTable.) |
![]() | QueryFeaturesAsync(QueryParameters, CancellationToken) |
Asynchronously performs query against the table.
(Inherited from FeatureTable.) |
![]() ![]() | QueryStatisticsAsync | Calculates values for the requested statistics. (Inherited from FeatureTable.) |
![]() | RetryLoadAsync |
Asynchronously retries loading of this table table.
(Inherited from FeatureTable.) |
![]() ![]() | UpdateFeatureAsync |
Asynchronously updates new Feature on the table.
(Inherited from FeatureTable.) |
![]() | UpdateFeaturesAsync |
Asynchronously updates the set of Features on the table.
(Inherited from FeatureTable.) |
Name | Description | |
---|---|---|
![]() ![]() | Loaded |
Occurs when the table is loaded.
(Inherited from FeatureTable.) |
![]() ![]() | LoadStatusChanged |
Occurs when the table LoadStatus is changed.
(Inherited from FeatureTable.) |
![]() | PropertyChanged |
Occurs when a property value changes.
(Inherited from FeatureTable.) |
A shapefile dataset consists of at least three files: *.shp, *.shx, and *.dbf (and may include various others). Open a shapefile using the path to the *.shp file (specified in Path). The associated *.shx and *.dbf files must be present at the same location and each of the component files of a shapefile must be smaller than 2 GB. If the minimum required files are not present(or larger than 2 GB), the table will fail to load. If the file permissions are read-only, features cannot be edited. On-the-fly projection of a shapefile is only supported if an associated *.prj file is present. Otherwise, the features are assumed to have the same spatial reference as the map.
WPF
Example Name: FeatureLayerShapefile
Open a shapefile stored on the device and display it as a feature layer with default symbology.
// 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 System.Windows; using ArcGISRuntime.Samples.Managers; using Esri.ArcGISRuntime.Mapping; using Esri.ArcGISRuntime.Data; namespace ArcGISRuntime.WPF.Samples.FeatureLayerShapefile { [ArcGISRuntime.Samples.Shared.Attributes.Sample( name: "Feature layer (shapefile)", category: "Data", description: "Open a shapefile stored on the device and display it as a feature layer with default symbology.", instructions: "Pan and zoom around the map to observe the data from the shapefile.", tags: new[] { "layers", "shapefile", "shp", "vector" })] [ArcGISRuntime.Samples.Shared.Attributes.OfflineData("d98b3e5293834c5f852f13c569930caa")] public partial class FeatureLayerShapefile { public FeatureLayerShapefile() { InitializeComponent(); // Open a shapefile stored locally and add it to the map as a feature layer Initialize(); } private async void Initialize() { // Create a new map to display in the map view with a streets basemap MyMapView.Map = new Map(Basemap.CreateStreetsVector()); // Get the path to the downloaded shapefile string filepath = GetShapefilePath(); try { // Open the shapefile ShapefileFeatureTable myShapefile = await ShapefileFeatureTable.OpenAsync(filepath); // Create a feature layer to display the shapefile FeatureLayer newFeatureLayer = new FeatureLayer(myShapefile); // Add the feature layer to the map MyMapView.Map.OperationalLayers.Add(newFeatureLayer); // Zoom the map to the extent of the shapefile await MyMapView.SetViewpointGeometryAsync(newFeatureLayer.FullExtent, 50); } catch (Exception e) { MessageBox.Show(e.ToString(), "Error"); } } private static string GetShapefilePath() { return DataManager.GetDataFolder("d98b3e5293834c5f852f13c569930caa", "Public_Art.shp"); } } }
<UserControl x:Class="ArcGISRuntime.WPF.Samples.FeatureLayerShapefile.FeatureLayerShapefile" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"> <esri:MapView x:Name="MyMapView" /> </UserControl>
Hyperlink to Example | Description |
---|---|
FeatureLayerShapefile | Open a shapefile stored on the device and display it as a feature layer with default symbology. |
ReadShapefileMetadata | Read a shapefile and display its metadata. |
SymbolizeShapefile | Display a shapefile with custom symbology. |