Feature Collection Table
A feature collection table represents an individual feature table in a FeatureCollection. A FeatureCollectionTable consists of a feature definition (table schema) and a set of features that match that feature definition. You can obtain a FeatureCollectionTable from an existing FeatureCollection.tables collection or you can create a new FeatureCollectionTable programmatically in your app.
To create a new FeatureCollectionTable, you can use a constructor that defines a set of fields, the geometry type, and spatial reference, and then populate it by adding new features. Alternatively, you can create a new FeatureCollectionTable from a FeatureSet, such as the FeatureQueryResult returned from a FeatureTable.queryFeatures.
To render the features in a map or scene, add the FeatureCollectionTable to a FeatureCollection.tables collection, construct a com.arcgismaps.mapping.layers.FeatureCollectionLayer from the FeatureCollection, and add it to the map or scene's collection of operational layers. To specify the FeatureCollectionTable symbology, just apply a renderer to the FeatureCollectionTable.renderer. If required, you can override this symbology on a per-feature basis using the FeatureCollectionTable.setSymbolOverride.
Since
200.1.0
Constructors
Creates a FeatureCollectionTable populated from the specified FeatureSet. The FeatureCollectionTable will be populated with the contents of the FeatureSet. Note that this constructor may take some time to complete depending on how many features are in the feature set.
Creates an empty FeatureCollectionTable from the specified fields, geometry type, spatial reference. The table can contain z and m values.
Creates a FeatureCollectionTable populated from the specified com.arcgismaps.mapping.GeoElement collection. The geometry type and spatial reference will be inferred from the geo-elements passed in. Note that this constructor may take some time to complete depending on how many geo-elements are passed in.
Properties
The type of geometry of the features stored in this table. If FeatureTable.hasGeometry is false, then the geometry type is com.arcgismaps.geometry.GeometryType.Unknown.
The layer info of the feature collection table.
The spatial reference of the table. A spatial reference defines how the coordinates of a feature's com.arcgismaps.geometry.Geometry correspond to locations in the real world. For more information, see the com.arcgismaps.geometry.SpatialReference class or the Spatial references documentation.
Inherited 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 com.arcgismaps.mapping.layers.FeatureLayer, the FeatureTable.displayName is used as the com.arcgismaps.mapping.layers.FeatureLayer.name.
True if the feature table supports geographic features, false otherwise.
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 layer that displays this table, if any. The com.arcgismaps.mapping.layers.Layer type depends on how the feature table is created. For example, a com.arcgismaps.mapping.layers.Layer will be an com.arcgismaps.mapping.layers.AnnotationLayer if the FeatureTable is created from a table that supports annotation. See com.arcgismaps.mapping.layers.Layer for more information about the supported layer types.
The load status.
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.numberOfFeatures will return the full number of features.
The pop-up definition. The PopupDefinition associated with the popup source. A null if an error occurs or if the popup source is not associated with a pop-up definition.
Functions
Inherited functions
Adds a feature to the table. Adding a feature that contains a com.arcgismaps.geometry.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 com.arcgismaps.geometry.SpatialReference.
Adds a collection of features to the table.
Determines whether you can add new features to the table. Although this method may state that the table allows new features to be added, the application may not be licensed to permit this. For example, a user cannot add features to a secured feature table if the application is licensed at the Lite level (com.arcgismaps.LicenseLevel.Lite).
Cancels loading metadata for the Loadable object.
Determines whether you can delete the feature from the table. Although this method may state that the table allows the feature to be deleted, the application may not be licensed to permit this. For example, a user cannot delete features from a secured feature table if the application is licensed at the Lite level (com.arcgismaps.LicenseLevel.Lite).
Determines whether you can edit the geometry field in a table. Although this method may state that the table allows geometry fields to be edited, the application may not be licensed to permit this. For example, a user cannot update geometry in a secured feature table if the application is licensed at the Lite level (com.arcgismaps.LicenseLevel.Lite).
Determines whether you can update the feature in the table. Although this method may state that the table allows the feature to be updated, the application may not be licensed to permit this. For example, a user cannot update features in a secured feature table if the application is licensed at the Lite level (com.arcgismaps.LicenseLevel.Lite).
Creates a new empty feature. The new feature is only available in memory at this point. Execute FeatureTable.addFeature 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 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 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 com.arcgismaps.geometry.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 com.arcgismaps.geometry.SpatialReference.
Updates a collection of features in the table.