ArcGISStreamServiceFilter Class

  • ArcGISStreamServiceFilter
  • class Esri::ArcGISRuntime::ArcGISStreamServiceFilter

    Limits which dynamic entities are returned from an ArcGIS stream service. More...

    Header: #include <ArcGISStreamServiceFilter.h>
    Since: Esri::ArcGISRuntime 200.1
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    ArcGISStreamServiceFilter(QObject *parent = nullptr)
    virtual ~ArcGISStreamServiceFilter() override
    Esri::ArcGISRuntime::Geometry geometry() const
    QStringList outFields() const
    Esri::ArcGISRuntime::SpatialReference outSpatialReference() const
    void setGeometry(const Esri::ArcGISRuntime::Geometry &geometry)
    void setOutFields(const QStringList &outFields)
    void setOutSpatialReference(const Esri::ArcGISRuntime::SpatialReference &outSpatialReference)
    void setWhereClause(const QString &whereClause)
    QString whereClause() const

    Detailed Description

    Set ArcGISStreamService::filter to an object of this type to apply a server-side filter on observations streamed from an ArcGIS stream service. Spatial or attribute filters (or both) are supported.

    Using this server-side filter is useful for limiting how much data is streamed from an ArcGISStreamService and handled in the client application, which can help with application performance and memory efficiency.

    Member Function Documentation

    [explicit] ArcGISStreamServiceFilter::ArcGISStreamServiceFilter(QObject *parent = nullptr)

    Creates an empty ArcGISStreamServiceFilter object.

    • parent - The optional parent QObject.

    [override virtual] ArcGISStreamServiceFilter::~ArcGISStreamServiceFilter()

    Destructor.

    Esri::ArcGISRuntime::Geometry ArcGISStreamServiceFilter::geometry() const

    Returns the geometry that is used to filter results.

    Dynamic entity observations that intersect this geometry are included in the stream. Those that are outside are excluded.

    The default value is empty, meaning no spatial filter is applied to the stream.

    Currently, only GeometryType::Envelope geometries are supported.

    See also setGeometry().

    [since Esri::ArcGISRuntime 200.2] QStringList ArcGISStreamServiceFilter::outFields() const

    Returns a collection of field names that identify the observation values the server should return. This property instructs the service to return a subset of values when pushing observations to the client. Restricting the values returned will limit the amount of memory required to store individual observations and therefore reduce the memory footprint of the application.

    The default is an empty QList, which returns all observation fields from the server.

    The output fields take effect when connecting to an empty DynamicEntityDataSource. The following three steps are required to modify the output fields for an existing connection: DynamicEntityDataSource::disconnectDataSourceAsync, DynamicEntityDataSource::purgeAllAsync, and DynamicEntityDataSource::connectDataSourceAsync.

    Note that the geometry, track ID (if available), and timestamp fields are always included with each observation.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also setOutFields().

    Esri::ArcGISRuntime::SpatialReference ArcGISStreamServiceFilter::outSpatialReference() const

    Returns the spatial reference that dynamic entities are returned in.

    Use this property to instruct the service to provide observation geometries in the given spatial reference.

    This property is useful if the client application needs dynamic entities in a specific spatial reference. Setting this property forces the server to reproject geometries before adding observations to the stream. This relieves the client application from the performance burden of reprojecting dynamic entities.

    The default value is empty, meaning observation geometries should be returned in the spatial reference of the service.

    See also setOutSpatialReference().

    void ArcGISStreamServiceFilter::setGeometry(const Esri::ArcGISRuntime::Geometry &geometry)

    Sets the geometry to geometry.

    See also geometry.

    [since Esri::ArcGISRuntime 200.2] void ArcGISStreamServiceFilter::setOutFields(const QStringList &outFields)

    Sets the outFields to outFields.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also outFields.

    void ArcGISStreamServiceFilter::setOutSpatialReference(const Esri::ArcGISRuntime::SpatialReference &outSpatialReference)

    Sets the outSpatialReference to outSpatialReference.

    See also outSpatialReference.

    void ArcGISStreamServiceFilter::setWhereClause(const QString &whereClause)

    Sets the whereClause to whereClause.

    See also whereClause.

    QString ArcGISStreamServiceFilter::whereClause() const

    Returns a SQL expression that defines the dynamic entities to return.

    Use this property to filter dynamic entities by attribute value. Setting this property forces the server to filter observations using the given expression before adding them to the stream.

    The expression used as the whereClause should follow standard SQL syntax as discussed in the document SQL reference for query expressions used in ArcGIS.

    The default value is an empty string, meaning that no attribute filter will be applied to the stream.

    See also setWhereClause().

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