- All Implemented Interfaces:
FeatureSet
,Loadable
,PopupSource
,Iterable<Feature>
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.getTables()
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.queryFeaturesAsync(QueryParameters)
.
To render the features in a map or scene, add the FeatureCollectionTable to a FeatureCollection.getTables()
collection, construct a 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 setRenderer(Renderer)
. If required, you can override this symbology on a
per-feature basis using the setSymbolOverride(Feature, Symbol)
.
- Since:
- 100.0.0
-
Property Summary
Properties inherited from class com.esri.arcgisruntime.data.FeatureTable
loadError, loadStatus
-
Constructor Summary
ConstructorDescriptionFeatureCollectionTable
(FeatureSet featureSet) Creates a FeatureCollectionTable populated from the specifiedFeatureSet
.FeatureCollectionTable
(Iterable<Field> fields, GeometryType geometryType, SpatialReference spatialReference) Creates an empty FeatureCollectionTable from the specified fields, geometry type and spatial reference.FeatureCollectionTable
(Iterable<Field> fields, GeometryType geometryType, SpatialReference spatialReference, boolean hasZ, boolean hasM) Creates an empty FeatureCollectionTable from the specified fields, geometry type, spatial reference.FeatureCollectionTable
(Iterable<GeoElement> geoElements, Iterable<Field> fields) Creates a FeatureCollectionTable populated from the specifiedGeoElement
collection. -
Method Summary
Modifier and TypeMethodDescriptionGets the layer info of this FeatureCollectionTable.Gets the renderer of this FeatureCollectionTable.getSymbolOverride
(Feature feature) Gets the symbol override for the given feature in the FeatureCollectionTable.getTitle()
Gets the title of this FeatureCollectionTable.iterator()
Returns an iterator over the set of features in this FeatureCollectionTable.void
setRenderer
(Renderer renderer) Sets the Renderer of this FeatureCollectionTable.void
setSymbolOverride
(Feature feature, Symbol symbol) Sets the symbol override for the given feature in the FeatureCollectionTable.void
Sets the title of this FeatureCollectionTable.Methods inherited from class com.esri.arcgisruntime.data.FeatureTable
addDoneLoadingListener, addFeatureAsync, addFeaturesAsync, addLoadStatusChangedListener, canAdd, cancelLoad, canDelete, canEditGeometry, canUpdate, createFeature, createFeature, deleteFeatureAsync, deleteFeaturesAsync, getDisplayName, getExtent, getField, getFields, getGeometryType, getLayer, getLoadError, getLoadStatus, getPopupDefinition, getSpatialReference, getTableName, getTotalFeatureCount, hasGeometry, hasM, hasZ, isEditable, isPopupEnabled, loadAsync, loadErrorProperty, loadStatusProperty, queryExtentAsync, queryFeatureCountAsync, queryFeaturesAsync, queryStatisticsAsync, removeDoneLoadingListener, removeLoadStatusChangedListener, retryLoadAsync, setDisplayName, setPopupDefinition, setPopupEnabled, updateFeatureAsync, updateFeaturesAsync
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.esri.arcgisruntime.data.FeatureSet
getFields, getGeometryType, getSpatialReference
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FeatureCollectionTable
public FeatureCollectionTable(Iterable<Field> fields, GeometryType geometryType, SpatialReference spatialReference) Creates an empty FeatureCollectionTable from the specified fields, geometry type and spatial reference.- Parameters:
fields
- the fields of all features in the tablegeometryType
- the geometry type of all features in the table, passGeometryType.UNKNOWN
to create a non-spatial FeatureCollectionTablespatialReference
- the spatial reference of all features in the table, can be null for a non-spatial FeatureCollectionTable- Throws:
IllegalArgumentException
- if- fields is null or empty
- geometryType is null
- spatialReference is null and geometryType not
GeometryType.UNKNOWN
- Since:
- 100.0.0
-
FeatureCollectionTable
public FeatureCollectionTable(Iterable<Field> fields, GeometryType geometryType, SpatialReference spatialReference, boolean hasZ, boolean hasM) Creates an empty FeatureCollectionTable from the specified fields, geometry type, spatial reference. The table can contain z and m values.- Parameters:
fields
- the fields of all features in the tablegeometryType
- the geometry type of all features in the table, passGeometryType.UNKNOWN
to create a non-spatial FeatureCollectionTablespatialReference
- the spatial reference of all features in the table, can be null for a non-spatial FeatureCollectionTablehasZ
- specifies whether the table supports geometries with z values, true if it does, false otherwisehasM
- specifies whether the table supports geometries with m values, true if it does, false otherwise- Throws:
IllegalArgumentException
- if- fields is null or empty
- geometryType is null
- spatialReference is null and geometryType not
GeometryType.UNKNOWN
- Since:
- 100.0.0
-
FeatureCollectionTable
Creates a FeatureCollectionTable populated from the specifiedGeoElement
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.
- Parameters:
geoElements
- the geo-elements to populate the FeatureCollectionTable withfields
- the fields of all features in the table- Throws:
IllegalArgumentException
- if- geoElements is null or empty
- fields is null or empty
- Since:
- 100.0.0
- See Also:
-
FeatureCollectionTable
Creates a FeatureCollectionTable populated from the specifiedFeatureSet
.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.- Parameters:
featureSet
- a set of features to populate the FeatureCollectionTable with- Throws:
IllegalArgumentException
- if featureSet is null- Since:
- 100.00
- See Also:
-
-
Method Details
-
getLayerInfo
Gets the layer info of this FeatureCollectionTable.- Returns:
- an ArcGISFeatureLayerInfo
- Since:
- 100.0.0
-
getRenderer
Gets the renderer of this FeatureCollectionTable.- Returns:
- the renderer used to render features of this table
- Since:
- 100.0.0
-
setRenderer
Sets the Renderer of this FeatureCollectionTable.- Parameters:
renderer
- the Renderer to use with this FeatureCollectionTable- Throws:
IllegalArgumentException
- if renderer is null- Since:
- 100.0.0
- See Also:
-
getSymbolOverride
Gets the symbol override for the given feature in the FeatureCollectionTable.- Parameters:
feature
- the feature in the table for which to retrieve its symbol override- Returns:
- a Symbol used to render the given feature
- Since:
- 100.0.0
-
setSymbolOverride
Sets the symbol override for the given feature in the FeatureCollectionTable. The specified symbol is used to render the given feature instead of the renderer of this table.- Parameters:
feature
- the feature in the table for which to set the specified symbol overridesymbol
- the symbol override- Since:
- 100.0.0
-
getTitle
Gets the title of this FeatureCollectionTable.- Returns:
- the title of this FeatureCollectionTable
- Since:
- 100.0.0
-
setTitle
Sets the title of this FeatureCollectionTable.- Parameters:
title
- the title of this FeatureCollectionTable- Since:
- 100.0.0
-
iterator
Returns an iterator over the set of features in this FeatureCollectionTable. Iterators previously returned from this method will become invalid and their methods will throw an IllegalStateException.
-