OgcFeatureCollectionTable Class

  • OgcFeatureCollectionTable
  • class Esri::ArcGISRuntime::OgcFeatureCollectionTable

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

    Header: #include <OgcFeatureCollectionTable.h>
    Since: Esri::ArcGISRuntime 100.9
    Inherits: Esri::ArcGISRuntime::FeatureTable and Esri::ArcGISRuntime::RemoteResource

    Public Functions

    OgcFeatureCollectionTable(Esri::ArcGISRuntime::OgcFeatureCollectionInfo *featureCollectionInfo, QObject *parent = nullptr)
    OgcFeatureCollectionTable(Esri::ArcGISRuntime::OgcFeatureCollectionInfo *featureCollectionInfo, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    OgcFeatureCollectionTable(const QUrl &url, const QString &collectionId, QObject *parent = nullptr)
    OgcFeatureCollectionTable(const QUrl &url, const QString &collectionId, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    virtual ~OgcFeatureCollectionTable() override
    Esri::ArcGISRuntime::OgcFeatureCollectionInfo *featureCollectionInfo() const
    Esri::ArcGISRuntime::FeatureRequestMode featureRequestMode() const
    QFuture<Esri::ArcGISRuntime::FeatureQueryResult *> populateFromServiceAsync(const Esri::ArcGISRuntime::QueryParameters &parameters, bool clearCache, const QStringList &outFields, QObject *parent = nullptr)
    void setFeatureRequestMode(Esri::ArcGISRuntime::FeatureRequestMode featureRequestMode)

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::Credential *credential() const override
    virtual Esri::ArcGISRuntime::RequestConfiguration requestConfiguration() const override
    virtual void setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override
    virtual QUrl url() const override

    Detailed Description

    To display data from an OGC feature collection table in a FeatureLayer use the FeatureLayer::FeatureLayer(Esri::ArcGISRuntime::FeatureTable*, QObject*) 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 FeatureCollection.

    This API provides building blocks for manipulating OGC 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 populateFromServiceAsync(const Esri::ArcGISRuntime::QueryParameters&, bool, const QStringList&, QObject*) method. Only the FeatureRequestMode::ManualCache mode is supported. This means populateFromServiceAsync(const Esri::ArcGISRuntime::QueryParameters&, bool, const QStringList&, QObject*) must be called to populate, query, and return features from the service. For the QueryParameters::whereClause that is used by the populateFromServiceAsync(const Esri::ArcGISRuntime::QueryParameters&, bool, const QStringList&, QObject*) method, you can put any CQL2-TEXT or CQL2-JSON string as defined in the document Common Query Language (CQL2).

    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

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

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

    [since Esri::ArcGISRuntime 100.13] OgcFeatureCollectionTable::OgcFeatureCollectionTable(Esri::ArcGISRuntime::OgcFeatureCollectionInfo *featureCollectionInfo, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

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

    • featureCollectionInfo - An OgcFeatureCollectionInfo.
    • credential - The credential used to access the remote resource.
    • parent - The optional parent QObject.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    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.

    [since Esri::ArcGISRuntime 100.13] OgcFeatureCollectionTable::OgcFeatureCollectionTable(const QUrl &url, const QString &collectionId, Esri::ArcGISRuntime::Credential *credential, 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.
    • credential - The credential used to access the remote resource.
    • parent - The optional parent QObject.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    [override virtual] OgcFeatureCollectionTable::~OgcFeatureCollectionTable()

    Destructor.

    [override virtual, since Esri::ArcGISRuntime 100.13] Esri::ArcGISRuntime::Credential *OgcFeatureCollectionTable::credential() const

    Reimplements: RemoteResource::credential() const.

    Returns the security credentials to access the remote resource.

    Only applicable if the resource is secured.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    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.

    You must set the feature request mode to FeatureRequestMode::ManualCache before attempting to populate the table using populateFromServiceAsync(const Esri::ArcGISRuntime::QueryParameters&, bool, const QStringList&, QObject*).

    See also setFeatureRequestMode().

    [since Esri::ArcGISRuntime 200.2] QFuture<Esri::ArcGISRuntime::FeatureQueryResult *> OgcFeatureCollectionTable::populateFromServiceAsync(const Esri::ArcGISRuntime::QueryParameters &parameters, bool clearCache, const QStringList &outFields, QObject *parent = nullptr)

    Populate 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.
    • parent - The optional parent QObject

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

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [override virtual, since Esri::ArcGISRuntime 100.13] Esri::ArcGISRuntime::RequestConfiguration OgcFeatureCollectionTable::requestConfiguration() const

    Reimplements: RemoteResource::requestConfiguration() const.

    Returns the RequestConfiguration used to customize the request to this RemoteResource.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    See also setRequestConfiguration().

    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.

    [override virtual, since Esri::ArcGISRuntime 100.13] void OgcFeatureCollectionTable::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration)

    Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).

    Sets the RequestConfiguration, which is used to customize the request to this RemoteResource, to requestConfiguration.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    See also requestConfiguration().

    [override virtual] QUrl OgcFeatureCollectionTable::url() const

    Reimplements: RemoteResource::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.