OgcFeatureCollectionTable Class

  • OgcFeatureCollectionTable
  • class Esri::ArcGISRuntime::OgcFeatureCollectionTable

    An OGC API - Features feature-collection table. More...

    Header: #include <OgcFeatureCollectionTable>
    Since: Esri::ArcGISRuntime 100.9
    Inherits: Esri::ArcGISRuntime::FeatureTable

    This class was introduced in Esri::ArcGISRuntime 100.9.

    Public Functions

    OgcFeatureCollectionTable(const QUrl &url, const QString &collectionId, QObject *parent = nullptr)
    OgcFeatureCollectionTable(Esri::ArcGISRuntime::OgcFeatureCollectionInfo *featureCollectionInfo, QObject *parent = nullptr)
    virtual ~OgcFeatureCollectionTable() override
    Esri::ArcGISRuntime::OgcFeatureCollectionInfo *featureCollectionInfo() const
    Esri::ArcGISRuntime::FeatureRequestMode featureRequestMode() const
    Esri::ArcGISRuntime::TaskWatcher populateFromService(const Esri::ArcGISRuntime::QueryParameters &parameters, bool clearCache, const QStringList &outfields)
    void setFeatureRequestMode(Esri::ArcGISRuntime::FeatureRequestMode featureRequestMode)
    QUrl url() const


    void populateFromServiceCompleted(QUuid taskId, Esri::ArcGISRuntime::FeatureQueryResult *featureQueryResult)

    Detailed Description

    To display data from an OGC feature collection table in a FeatureLayer use the FeatureLayer::FeatureLayer(FeatureTable) constructor where the OgcFeatureCollectionTable is the parameter that is passed into the constructor. Note: The OgcFeatureCollectionTable should not be confused with FeatureCollectionTable which is used as an input to create a FeatureCollectionLayer.

    The ArcGIS Runtime API for OGC API Features provides building blocks for manipulating features on the Web. For more information about the OGC API Features specification see the documents: OGC API - Features - Part 1 and OGC API - Features - Part 2.

    The class includes two important members: the featureRequestMode property and the populateFromService(QueryParameters, bool, QStringList) method. Only the FeatureRequestMode::ManualCache mode is supported. This means populateFromService(QueryParameters, bool, QStringList) must be called to populate, query, and return features from the service. For the QueryParameters::whereClause that is used by the populateFromService(QueryParameters, bool, QStringList) method, you can put any CQL-TEXT or CQL-JSON string as defined in the document OGC API - Features - Part3.

    When populating or updating a local table from an OGC service, you can now request features in a specified SpatialReference (also referred to as SRS in ArcGIS or CRS in OGC). This leverages the power of the server to return features in the same spatial reference as your map rather than having to re-project them on the client.

    This class supports loading and querying of features from a non-spatial OGC feature collection table.

    Member Function Documentation

    OgcFeatureCollectionTable::OgcFeatureCollectionTable(const QUrl &url, const QString &collectionId, QObject *parent = nullptr)

    Creates a new OGC API - Features feature-collection table.

    • url - The URL of the OGC API - Features service landing page that contains the feature collection.
    • collectionId - The unique identifier for the collection from the service.
    • parent - The optional parent QObject.

    OgcFeatureCollectionTable::OgcFeatureCollectionTable(Esri::ArcGISRuntime::OgcFeatureCollectionInfo *featureCollectionInfo, QObject *parent = nullptr)

    Creates a new OGC API - Features feature-collection table.

    [signal] void OgcFeatureCollectionTable::populateFromServiceCompleted(QUuid taskId, Esri::ArcGISRuntime::FeatureQueryResult *featureQueryResult)

    Signal emitted when the populateFromService operation completes.

    • taskId - The task ID of the asynchronous operation.
    • featureQueryResult - The result of the populate operation.

    See also Returned QObjects Parenting.

    [override virtual] OgcFeatureCollectionTable::~OgcFeatureCollectionTable()


    Esri::ArcGISRuntime::OgcFeatureCollectionInfo *OgcFeatureCollectionTable::featureCollectionInfo() const

    Returns the OGC API - Features feature-collection metadata, which includes id, title, and description.

    Esri::ArcGISRuntime::FeatureRequestMode OgcFeatureCollectionTable::featureRequestMode() const

    Returns the mode defining when features are requested from the service.

    See also setFeatureRequestMode().

    Esri::ArcGISRuntime::TaskWatcher OgcFeatureCollectionTable::populateFromService(const Esri::ArcGISRuntime::QueryParameters &parameters, bool clearCache, const QStringList &outfields)

    Populates the OGC API - Features feature-collection table with the results of a query.

    • parameters - Parameters that define how features are returned from the service.
    • clearCache - If true, clears existing table data before populating it with features returned from the service.
    • outfields - A QStringList.

    Use the default (empty) QueryParameters to get all features from the service. Specifying nullptr or an empty list for outfields will result in the default set of outfields being used. Spatial queries (those that specify geometries) must use the Intersects spatial relationship.

    Returns a TaskWatcher for the asynchronous operation.

    void OgcFeatureCollectionTable::setFeatureRequestMode(Esri::ArcGISRuntime::FeatureRequestMode featureRequestMode)

    Sets the featureRequestMode to featureRequestMode.

    Note: Your code must set this to FeatureRequestMode::ManualCache before the table is loaded. FeatureRequestMode::ManualCache is the only mode supported in the current release. The default value of FeatureRequestMode::OnInteractionCache will be supported in a future release and will continue to be the default value.

    See also featureRequestMode.

    QUrl OgcFeatureCollectionTable::url() const

    Returns the URL of the OGC API - Features service landing page.

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