FeatureFenceParameters Class

  • FeatureFenceParameters
  • class Esri::ArcGISRuntime::FeatureFenceParameters

    Geotrigger fence data created from features. More...

    Header: #include <FeatureFenceParameters.h>
    Since: Esri::ArcGISRuntime 100.12
    Inherits: Esri::ArcGISRuntime::FenceParameters

    Public Functions

    FeatureFenceParameters(Esri::ArcGISRuntime::FeatureTable *featureTable, QObject *parent = nullptr)
    FeatureFenceParameters(Esri::ArcGISRuntime::FeatureTable *featureTable, double bufferDistance, QObject *parent = nullptr)
    virtual ~FeatureFenceParameters() override
    Esri::ArcGISRuntime::Geometry areaOfInterest() const
    Esri::ArcGISRuntime::FeatureTable *featureTable() const
    void setAreaOfInterest(const Esri::ArcGISRuntime::Geometry &areaOfInterest)
    void setWhereClause(const QString &whereClause)
    QString whereClause() const

    Detailed Description

    The features that create a FeatureFenceParameters provide a set of geometries (and attributes) that define targets for the Geotrigger. For example, if the condition is "notify me when my position comes within 50 meters of one of my target areas", the fence data are "my target areas" and each Feature is one target area.

    Create a FeatureFenceParameters using a FeatureTable. The features can have point, line, or polygon geometry. For points and lines, you must also supply a FenceParameters::bufferDistance. Each feature in the table represents a single fence.

    You can filter features using attributes or geometry by supplying a where clause. For example, you could further refine "my target areas" to be "my target areas that are open and are in California".

    The number of features fetched by querying an online table is limited by the layer's ArcGISFeatureLayerInfo::maxRecordCount. Service feature tables that support pagination ArcGISFeatureLayerInfo::isSupportsPagination are not subject to the maximum feature count limit.

    A FenceGeotrigger can also take into account floors within buildings. If the feature table used to create the FeatureFenceParameters is referenced by a FeatureLayer that is FloorAware, and the AbstractLocationDataSource used to create the GeotriggerFeed includes LocationSourcePropertiesKeys::floor information, then fences will only be entered when they are intersected by a Location on the correct floor. If the fence or location data does not include valid floor information, the floor is ignored and the fence is entered when it is intersected by the location.

    A floor aware feature layer or table must be part of a GeoModel that includes a valid GeoModelFloorDefinition. All layers and tables that are used by the floor definition are loaded when the GeotriggerMonitor is started.

    A Location can contain the floor property as part of Location::additionalSourceProperties. This is populated automatically by IndoorsLocationDataSource, or can be supplied as part of your own implementation.

    A GeotriggerMonitor accounts for changes to the featureTable while the geotrigger is active. Added, removed, or updated fence features trigger a notification by the geotrigger monitor when the updated feature meets or no longer meets the geotrigger condition.

    Updates to the featureTable occur in the following situations:

    • An edit (add, update, or delete) is submitted to the local feature table.
    • User interactions, like performing a pan or zoom in a map or scene, request updates from an online feature table (ServiceFeatureTable) for the new visible extent.
    • If FeatureLayer::refreshInterval is set on a layer associated with the featureTable, feature fences are updated at the specified interval. For a ServiceFeatureTable, fence features requested from the server include features within the buffered visible extent as well as features near the current device location. This allows the geotrigger monitor to check fences both inside and outside of the current visible area.
    • Online feature fences are explicitly requested using ServiceFeatureTable::populateFromServiceAsync(const Esri::ArcGISRuntime::QueryParameters&, bool, const QStringList&, QObject*). Use this method to control how and when feature fence updates are requested from a server. Setting the clearCache parameter of this method to true clears fence features from the local feature table before repopulating with updated features from the server. This ensures that deleted features are recognized and that the geotrigger monitor sends exit notifications.

    Dynamic feature fence capabilities are enabled for ServiceFeatureTable, GeodatabaseFeatureTable, and FeatureCollectionTable table types. They are disabled for all other table types and in the following circumstances:

    Member Function Documentation

    [explicit] FeatureFenceParameters::FeatureFenceParameters(Esri::ArcGISRuntime::FeatureTable *featureTable, QObject *parent = nullptr)

    Creates a FeatureFenceParameters using all of the features in the FeatureTable.

    FeatureFenceParameters::FeatureFenceParameters(Esri::ArcGISRuntime::FeatureTable *featureTable, double bufferDistance, QObject *parent = nullptr)

    Creates a FeatureFenceParameters using all of the features in the FeatureTable.

    [override virtual] FeatureFenceParameters::~FeatureFenceParameters()

    Destructor.

    Esri::ArcGISRuntime::Geometry FeatureFenceParameters::areaOfInterest() const

    Returns the geometry that can be used to spatially filter fences.

    This needs to be either an Envelope or Polygon. Use this to define which features in the FeatureTable are to be used as fences by defining an area of interest. If this property is empty, we will use the full extent of the feature table.

    See also setAreaOfInterest().

    Esri::ArcGISRuntime::FeatureTable *FeatureFenceParameters::featureTable() const

    Returns the FeatureTable that contains the features to use in the FeatureFenceParameters.

    This table can be shared with a FeatureLayer::featureTable.

    This property will be nullptr if the FeatureLayer within a web map could not be found.

    When saving new geotriggers into a web map, ensure all feature layer's are assigned a unique Layer::layerId. This ensures the saved FeatureFenceParameters::featureTable is associated with the corresponding layer. When the saved Map and GeoModel::geotriggersInfo are loaded, the layer and geotrigger will use the same FeatureTable.

    void FeatureFenceParameters::setAreaOfInterest(const Esri::ArcGISRuntime::Geometry &areaOfInterest)

    Sets the areaOfInterest to areaOfInterest.

    See also areaOfInterest.

    void FeatureFenceParameters::setWhereClause(const QString &whereClause)

    Sets the whereClause to whereClause.

    See also whereClause.

    QString FeatureFenceParameters::whereClause() const

    Returns a where clause that defines the features from the FeatureTable to use as fences.

    The number of features fetched by querying an online table is limited by the layer's ArcGISFeatureLayerInfo::maxRecordCount. Service feature tables that support pagination ArcGISFeatureLayerInfo::isSupportsPagination are not subject to the maximum feature count limit.

    The string that is used as the FeatureFenceParameters::whereClause should follow standard SQL syntax similar to what is discussed in the document SQL reference for query expressions used in ArcGIS.

    The number of features fetched by querying an online table is limited by the layer's ArcGISFeatureLayerInfo::maxRecordCount. Service feature tables that support pagination (ArcGISFeatureLayerInfo::isSupportsPagination) are not subject to the maximum feature count limit.

    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.