Shapefile Feature Table
An object that represents a shapefile table. A shapefile dataset consists of at least three files (.shp, .shx, .dbf), and may include many others. 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. A default renderer is used to render a shapefile feature table in a feature layer. In most cases, the default should be replaced with a custom renderer.
Constructors
Create a shapefile feature table from a path to a local shapefile. A shapefile dataset consists of at least three files (.shp, .shx, .dbf), and may include many others. Each of the component files of a shapefile must be smaller than 2 GB. When creating a shapefile feature table, the path must point to the .shp file and the associated .shx and .dbf files must be present at the same location.
Functions
Adds a feature to the table. Adding a feature that contains a Geometry causes the geometry to become simplified. This may change a single part geometry to a multipart geometry, or round off X, Y, Z, and M coordinate values that are above the resolution set by the SpatialReference.
Adds a collection of features to the table.
Cancels loading metadata for the Loadable object.
Determines whether you can edit the geometry field in a table.
Close a shapefile feature table. The use of all data it contains should cease before closing a shapefile feature table. For example: remove feature layer from maps and release feature tables. Attempts to access a shapefile feature table after it is closed will fail, resulting in an error. After closing a shapefile feature table, the underlying file it references can be deleted.
Creates a new empty feature. The new feature is only available in memory at this point. Execute FeatureTable.addFeature(Feature) to commit the new Feature to the table.
Creates a new feature with the provided attribute values and, optionally, geometry. The new feature is only available in memory at this point. Execute FeatureTable.addFeature(Feature) to commit the new Feature to the table.
Deletes a feature from the table. Deleting a feature from a GeodatabaseFeatureTable in a stand-alone mobile geodatabase created with ArcGIS Pro is not supported when the table participates in a controller dataset, such as a utility network or parcel fabric. Use FeatureTable.canDelete(Feature) to determine if this operation is allowed.
Deletes a collection of features from the table.
Determines the minimum bounding envelope that contains features satisfying the provided query parameters. If no features meet the query criteria, an empty envelope is returned.
Determines the count of features that satisfy the provided query parameters.
Submits a query against the table.
Calculates values for the requested statistics. Statistics query parameters may also define fields on which results are grouped or sorted.
Updates a feature in the table. If you update a feature that contains a Geometry, the geometry becomes simplified. This may change a single part geometry to a multipart geometry, or round X, Y, Z, and M coordinate values that are above the resolution set by the SpatialReference.
Updates a collection of features in the table.
Properties
A user-friendly name that can be displayed in the UI (for example, in a Table of Contents). If the table is displayed with a FeatureLayer, the FeatureTable.getDisplayName() is used as the FeatureLayer.getName().
The type of geometry of the features stored in this table. If FeatureTable.getHasGeometry() is false, then the geometry type is GeometryType.Unknown.
True if this feature table is editable, false otherwise. Underlying file permissions (for subclasses such as ShapefileFeatureTable and GeodatabaseFeatureTable) can be changed while the feature table is open. In these cases the value of this property may not be accurate.
A flag indicating whether the PopupDefinition defined on the PopupSource is enable / disable. Will return false if an error occurs.
The number of features in the table. If all the features are stored in the local table, for example with a GeodatabaseFeatureTable or a ShapefileFeatureTable, then the FeatureTable.getNumberOfFeatures() will return the full number of features.
The path to the shapefile. A shapefile dataset consists of at least three files (.shp, .shx, .dbf), and may include many others. Each of the component files of a shapefile must be smaller than 2 GB. The path for a shapefile feature table points to the .shp file and the associated .shx and .dbf files must be available at the same location. The path can only be assigned when the shapefile is not loaded or has previously failed to load.
Whether or not the shapefile uses spatial indexes. ArcGIS for Desktop can be used to create spatial indexes for shapefiles, stored in .sbn and .sbx files. Having a current spatial index ensures that a high level of performance is maintained when drawing and working with the shapefile's features and that the shapefile's extent is accurate.