Class FeatureCollectionTable
- java.lang.Object
-
- com.esri.arcgisruntime.data.FeatureTable
-
- com.esri.arcgisruntime.data.FeatureCollectionTable
-
- All Implemented Interfaces:
FeatureSet
,Loadable
,PopupSource
,Iterable<Feature>
public final class FeatureCollectionTable extends FeatureTable implements FeatureSet
Represents an individual feature table in aFeatureCollection
. It consists of a feature definition (table schema) and a set of features that match that feature definition. It offers support for overriding the renderer symbology on a per-feature basis. All features in a FeatureCollectionTable contain the sameGeometryType
.There are different ways to create and populate a new FeatureCollectionTable. You can use the constructors to define the set of
Field
s,SpatialReference
, andGeometryType
of the table, and then add rows (features). Alternatively you can directly create the table from aFeatureSet
, such as aFeatureQueryResult
returned fromFeatureTable.queryFeaturesAsync(QueryParameters)
. Also seeFeatureCollection
on how to render the features from a FeatureCollectionTable after adding the table to a FeatureCollection.- Since:
- 100.0.0
-
-
Constructor Summary
Constructors Constructor Description FeatureCollectionTable(FeatureSet featureSet)
Creates a FeatureCollectionTable populated with the features from the given FeatureSet.FeatureCollectionTable(Iterable<Field> fields, GeometryType geometryType, SpatialReference spatialReference)
Creates a FeatureCollectionTable from a table schema, that is, a set of fields, geometry type and spatial reference.FeatureCollectionTable(Iterable<Field> fields, GeometryType geometryType, SpatialReference spatialReference, boolean hasZ, boolean hasM)
Creates a FeatureCollectionTable from a table schema, that is, a set of fields, geometry type and spatial reference.FeatureCollectionTable(Iterable<GeoElement> geoElements, Iterable<Field> fields)
Creates a FeatureCollectionTable populated with the given geo-elements.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArcGISFeatureLayerInfo
getLayerInfo()
Gets the layer info of this FeatureCollectionTable.Renderer
getRenderer()
Gets the renderer of this FeatureCollectionTable.Symbol
getSymbolOverride(Feature feature)
Gets the symbol override for the given feature in the FeatureCollectionTable.String
getTitle()
Gets the title of this FeatureCollectionTable.Iterator<Feature>
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
setTitle(String title)
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, getFeatureLayer, getField, getFields, getGeometryType, getLayer, getLoadError, getLoadStatus, getPopupDefinition, getSpatialReference, getTableName, getTotalFeatureCount, hasGeometry, hasM, hasZ, isEditable, isPopupEnabled, loadAsync, onDoneLoadingInternal, 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 Detail
-
FeatureCollectionTable
public FeatureCollectionTable(Iterable<Field> fields, GeometryType geometryType, SpatialReference spatialReference)
Creates a FeatureCollectionTable from a table schema, that is, a set of 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 a FeatureCollectionTable from a table schema, that is, a set of 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 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
public FeatureCollectionTable(Iterable<GeoElement> geoElements, Iterable<Field> fields)
Creates a FeatureCollectionTable populated with the given geo-elements. The geometry type and spatial reference will be inferred from the geo-elements passed in.The given fields will be used to create the table schema. If any geo-elements have more fields than the table schema the additional fields will be ignored. If any geo-elements have fewer fields, the missing fields will be initialized with the field default values.
- 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:
GeoElement
-
FeatureCollectionTable
public FeatureCollectionTable(FeatureSet featureSet)
Creates a FeatureCollectionTable populated with the features from the given FeatureSet. The geometry type and spatial reference will be inferred from the FeatureSet passed in.- Parameters:
featureSet
- a set of features to populate the FeatureCollectionTable with- Throws:
IllegalArgumentException
- if featureSet is null- Since:
- 100.00
- See Also:
FeatureSet
-
-
Method Detail
-
getLayerInfo
public ArcGISFeatureLayerInfo getLayerInfo()
Gets the layer info of this FeatureCollectionTable.- Returns:
- an ArcGISFeatureLayerInfo
- Since:
- 100.0.0
-
getRenderer
public Renderer getRenderer()
Gets the renderer of this FeatureCollectionTable.- Returns:
- the renderer used to render features of this table
- Since:
- 100.0.0
-
setRenderer
public void setRenderer(Renderer renderer)
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:
Renderer
-
getSymbolOverride
public Symbol getSymbolOverride(Feature feature)
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
public void setSymbolOverride(Feature feature, Symbol symbol)
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
public String getTitle()
Gets the title of this FeatureCollectionTable.- Returns:
- the title of this FeatureCollectionTable
- Since:
- 100.0.0
-
setTitle
public void setTitle(String title)
Sets the title of this FeatureCollectionTable.- Parameters:
title
- the title of this FeatureCollectionTable- Since:
- 100.0.0
-
-