Skip To Content ArcGIS for Developers Sign In Dashboard

WfsFeatureTable Class

(Esri::ArcGISRuntime::WfsFeatureTable)

A table in an OGC Web Feature Service. More...

Header: #include <WfsFeatureTable>
Since: Esri::ArcGISRuntime 100.5
Inherits: FeatureTable

Public Functions

WfsFeatureTable(const WfsLayerInfo &layerInfo, QObject *parent = nullptr)
WfsFeatureTable(const QUrl &url, const QString &tableName, QObject *parent = nullptr)
~WfsFeatureTable()
OgcAxisOrder axisOrder() const
FeatureRequestMode featureRequestMode() const
OgcAxisOrder filterAxisOrder() const
WfsLayerInfo layerInfo() const
TaskWatcher populateFromService(const QueryParameters &parameters, bool clearCache, const QStringList &outfields)
TaskWatcher populateFromService(const QString &xmlRequest, bool clearCache)
SpatialReference preferredSpatialReference() const
void setAxisOrder(OgcAxisOrder axisOrder)
void setFeatureRequestMode(FeatureRequestMode featureRequestMode)
void setFilterAxisOrder(OgcAxisOrder filterAxisOrder)
void setPreferredSpatialReference(const SpatialReference &preferredSpatialReference)
QUrl url() const

Signals

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

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

A table in an OGC Web Feature Service.

Member Function Documentation

WfsFeatureTable::WfsFeatureTable(const WfsLayerInfo &layerInfo, QObject *parent = nullptr)

Constructor that takes a layerInfo and an optional parent.

WfsFeatureTable::WfsFeatureTable(const QUrl &url, const QString &tableName, QObject *parent = nullptr)

Constructor that takes a url, tableName, and an optional parent.

WfsFeatureTable::~WfsFeatureTable()

Destructor

OgcAxisOrder WfsFeatureTable::axisOrder() const

Returns the axis order, which defines how coordinates are interpreted.

See also setAxisOrder.

FeatureRequestMode WfsFeatureTable::featureRequestMode() const

Returns the FeatureRequestMode of the WfsFeatureTable.

See also setFeatureRequestMode.

OgcAxisOrder WfsFeatureTable::filterAxisOrder() const

Returns the axis order of the filter.

See also setFilterAxisOrder.

WfsLayerInfo WfsFeatureTable::layerInfo() const

Returns the WFS layer metadata, which includes name and description.

TaskWatcher WfsFeatureTable::populateFromService(const QueryParameters &parameters, bool clearCache, const QStringList &outfields)

Populate the table using a query.

Specifying an empty QueryParameters for parameters will result in requesting all features. Specifying an empty list for outfields will result in the default set of outfields being used. WFS is only compatible with a subset of possible queries defined by QueryParameters. The where clause only works when the table is backed by a service powered by GeoServer. Spatial queries (those that specify geometries) must use the Intersects spatial relationship.

If clearCache is true, the existing table data is cleared before populating with the query result.

TaskWatcher WfsFeatureTable::populateFromService(const QString &xmlRequest, bool clearCache)

Populate the table using an XML query.

  • xmlRequest - The XML query string.
  • clearCache - when true, the existing table data is cleared before populating with the query result.

The XML query must be made against the same feature type represented by the WFS feature table. The schema of the query result must match or be a subset of the schema of the table. The XML query string must be an XML-encoded GetFeature request.

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

Signal emitted when a populateFromService method has completed.

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

The returned FeatureQueryResult object has the WfsFeatureTable as its parent.

See also Returned QObjects Parenting.

SpatialReference WfsFeatureTable::preferredSpatialReference() const

Returns the preferred spatial reference of the WFS feature table.

See also setPreferredSpatialReference.

void WfsFeatureTable::setAxisOrder(OgcAxisOrder axisOrder)

Sets the axis order to axisOrder.

Some WFS services return coordinates in (X,Y) order, while others use (Y,X). Setting this property to OgcAxisOrder::Swap will result in all coordinates in geometries being swapped from what was sent by the server. Setting to OgsAxisOrder::NoSwap will cause coordinates to be interpreted as-is. AxisOrder can be changed on an already-loaded table, but that change will only affect future calls to populateFromService. Features that are already in the table will not be modified.

Defaults to OgcAxisOrder::Auto. In this mode, Runtime will make its best guess using heuristics that are optimized for good results with most popular WFS servers.

See also axisOrder().

void WfsFeatureTable::setFeatureRequestMode(FeatureRequestMode featureRequestMode)

Sets the FeatureRequestMode of the WfsFeatureTable 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().

void WfsFeatureTable::setFilterAxisOrder(OgcAxisOrder filterAxisOrder)

Sets the axis order of the filter to filterAxisOrder.

Axis order determines how geometry coordinates are ordered when sent to the server as part of spatial queries.

Some WFS services expect coordinates to be sent in (X,Y) order, while others use (Y,X). Use OgcAxisOrder::Swap to send coordinates in (Y,X) order. Use OgcAxisOrder::NoSwap to send coordinates in (X,Y) order.

Defaults to OgcAxisOrder::Auto.

See also filterAxisOrder().

void WfsFeatureTable::setPreferredSpatialReference(const SpatialReference &preferredSpatialReference)

Sets the preferred spatial reference of the WFS feature table to preferredSpatialReference.

If the preferred spatial reference isn't available from the service, the table will fail to load. Specify a preferred spatial reference that matches the map or scene's spatial reference to avoid automatic reprojection. The preferred spatial reference cannot be changed on a loaded table.

See also preferredSpatialReference().

QUrl WfsFeatureTable::url() const

Returns the URL of the WFS feature table.


Feedback on this topic?