FeatureCollectionTable Class

  • FeatureCollectionTable
  • class Esri::ArcGISRuntime::FeatureCollectionTable

    A feature collection table represents an individual feature table in a FeatureCollection. More...

    Header: #include <FeatureCollectionTable.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::FeatureTable and Esri::ArcGISRuntime::FeatureSet

    Public Functions

    FeatureCollectionTable(const QList<Esri::ArcGISRuntime::Field> &fields, Esri::ArcGISRuntime::GeometryType geometryType, const Esri::ArcGISRuntime::SpatialReference &spatialReference, QObject *parent = nullptr)
    FeatureCollectionTable(const QList<Esri::ArcGISRuntime::Field> &fields, Esri::ArcGISRuntime::GeometryType geometryType, const Esri::ArcGISRuntime::SpatialReference &spatialReference, bool hasZ, bool hasM, QObject *parent = nullptr)
    FeatureCollectionTable(const QList<Esri::ArcGISRuntime::GeoElement *> &geoElements, const QList<Esri::ArcGISRuntime::Field> &fields, QObject *parent = nullptr)
    FeatureCollectionTable(Esri::ArcGISRuntime::FeatureSet *featureSet, QObject *parent = nullptr)
    virtual ~FeatureCollectionTable() override
    Esri::ArcGISRuntime::ArcGISFeatureLayerInfo layerInfo()
    Esri::ArcGISRuntime::Renderer *renderer() const
    void setRenderer(Esri::ArcGISRuntime::Renderer *renderer)
    void setSymbolOverride(Esri::ArcGISRuntime::Feature *feature, Esri::ArcGISRuntime::Symbol *symbol)
    Esri::ArcGISRuntime::Symbol *symbolOverride(Esri::ArcGISRuntime::Feature *feature) const

    Reimplemented Public Functions

    virtual QList<Esri::ArcGISRuntime::Field> fields() const override
    virtual Esri::ArcGISRuntime::GeometryType geometryType() const override
    virtual Esri::ArcGISRuntime::FeatureIterator iterator() const override
    virtual Esri::ArcGISRuntime::SpatialReference spatialReference() const override

    Detailed Description

    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::queryFeaturesAsync(const Esri::ArcGISRuntime::QueryParameters&, QObject*).

    To render the features in a map or scene, add the FeatureCollectionTable to a FeatureCollection::tables 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 renderer. If required, you can override this symbology on a per-feature basis using the setSymbolOverride(Esri::ArcGISRuntime::Feature*, Esri::ArcGISRuntime::Symbol*).

    Relevant samples:

    • Feature collection layer: Create a Feature Collection Layer from a Feature Collection Table, and add it to a map.
    • Feature collection layer (query): Create a feature collection layer to show a query result from a service feature table.
    • Viewshed (Geoprocessing): Calculate a viewshed using a geoprocessing service, in this case showing which parts of a landscape are visible from points on mountainous terrain.

    Member Function Documentation

    FeatureCollectionTable::FeatureCollectionTable(const QList<Esri::ArcGISRuntime::Field> &fields, Esri::ArcGISRuntime::GeometryType geometryType, const Esri::ArcGISRuntime::SpatialReference &spatialReference, QObject *parent = nullptr)

    Creates an empty FeatureCollectionTable from the specified fields, geometry type and spatial reference.

    • fields - A QList of type Field. Contents of the QList will be copied. Can be empty.
    • geometryType - The type of geometry that will be held in this table. Can be GeometryType::Unknown.
    • spatialReference - The spatial reference of the features that will be held in this table. Can be empty as long as geometry_type is GeometryType::Unknown.
    • parent - The optional parent QObject.

    FeatureCollectionTable::FeatureCollectionTable(const QList<Esri::ArcGISRuntime::Field> &fields, Esri::ArcGISRuntime::GeometryType geometryType, const Esri::ArcGISRuntime::SpatialReference &spatialReference, bool hasZ, bool hasM, QObject *parent = nullptr)

    Creates an empty FeatureCollectionTable from the specified fields, geometry type, spatial reference. The table can contain z and m values.

    • fields - A QList of type Field. Contents of the QList will be copied. Can be empty.
    • geometryType - The type of geometry that will be held in this table. Can be GeometryType::Unknown.
    • spatialReference - The spatial reference of the features that will be held in this table. Can be empty as long as geometry_type is GeometryType::Unknown.
    • hasZ - Boolean specifying whether the table supports geometries with Z values.
    • hasM - Boolean specifying whether the table supports geometries with M values.
    • parent - The optional parent QObject.

    FeatureCollectionTable::FeatureCollectionTable(const QList<Esri::ArcGISRuntime::GeoElement *> &geoElements, const QList<Esri::ArcGISRuntime::Field> &fields, QObject *parent = nullptr)

    Creates a FeatureCollectionTable populated from the specified GeoElement collection.

    • geoElements - A QList of objects that implement the GeoElement. Contents of the QList will be copied.
    • fields - A QList of type Field. Contents of the QList will be copied. Can be empty.
    • parent - The optional parent QObject.

    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.

    [explicit] FeatureCollectionTable::FeatureCollectionTable(Esri::ArcGISRuntime::FeatureSet *featureSet, QObject *parent = nullptr)

    Creates a FeatureCollectionTable populated from the specified FeatureSet.

    • featureSet - An object that implements the FeatureSet.
    • parent - The optional parent QObject.

    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.

    [override virtual] FeatureCollectionTable::~FeatureCollectionTable()

    Destructor.

    [override virtual] QList<Esri::ArcGISRuntime::Field> FeatureCollectionTable::fields() const

    Reimplements: FeatureSet::fields() const.

    Returns a list of Field objects representing the fields in this FeatureCollectionTable.

    [override virtual] Esri::ArcGISRuntime::GeometryType FeatureCollectionTable::geometryType() const

    Reimplements: FeatureSet::geometryType() const.

    Returns the type of geometry shared by all features in this FeatureCollectionTable.

    [override virtual] Esri::ArcGISRuntime::FeatureIterator FeatureCollectionTable::iterator() const

    Reimplements: FeatureSet::iterator() const.

    Returns an iterator to iterate over the features in this FeatureCollectionTable.

    Esri::ArcGISRuntime::ArcGISFeatureLayerInfo FeatureCollectionTable::layerInfo()

    Gets the layer info of the FeatureCollectionTable.

    Esri::ArcGISRuntime::Renderer *FeatureCollectionTable::renderer() const

    Returns the renderer specifying how the features should be symbolized.

    See also setRenderer().

    void FeatureCollectionTable::setRenderer(Esri::ArcGISRuntime::Renderer *renderer)

    Sets the renderer specifying how the features in this FeatureCollectionTable should be symbolized.

    See also renderer().

    void FeatureCollectionTable::setSymbolOverride(Esri::ArcGISRuntime::Feature *feature, Esri::ArcGISRuntime::Symbol *symbol)

    Sets the symbol override for the given feature in the FeatureCollectionTable to symbol.

    See also symbolOverride().

    [override virtual] Esri::ArcGISRuntime::SpatialReference FeatureCollectionTable::spatialReference() const

    Reimplements: FeatureSet::spatialReference() const.

    Returns the spatial reference of the features in this FeatureCollectionTable.

    Esri::ArcGISRuntime::Symbol *FeatureCollectionTable::symbolOverride(Esri::ArcGISRuntime::Feature *feature) const

    Gets the symbol override for the given feature in the FeatureCollectionTable.

    See also setSymbolOverride().

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.