populateFromService

suspend fun populateFromService(parameters: QueryParameters?, clearCache: Boolean, outFields: Iterable<String>): Result<FeatureQueryResult>

Populates the WFS feature table using the query parameters. Use the default (empty) QueryParameters to get all features from the service. If you specify a null or an empty collection for outfields, then the default set of outfields are used.

WFS is compatible with a subset of possible queries defined by QueryParameters. The QueryParameters.whereClause only works when the table is backed by a service powered by a GeoServer. Spatial queries (those that specify geometries) must use the SpatialRelationship.Intersects spatial relationship.

You must ensure that the WfsFeatureTable.featureRequestMode is set to FeatureRequestMode.ManualCache before attempting to populate the table.

Return

A Result that returns a FeatureQueryResult type.

Since

200.1.0

Parameters

parameters

Options for controlling the operation.

clearCache

If true, the existing table data is cleared before it is populated with the query result.

outFields

A MutableList containing String.


suspend fun populateFromService(xmlRequest: String, clearCache: Boolean): Result<FeatureQueryResult>

Populates the table using an XML query. The schema of the query result must match or be a subset of the schema of the table. The XML query must be made against the same feature type represented by the WFS feature table.

You must ensure that the WfsFeatureTable.featureRequestMode is set to FeatureRequestMode.ManualCache before attempting to populate the table.

Return

A Result that returns a FeatureQueryResult type.

Since

200.1.0

Parameters

xmlRequest

An XML string representing the complete GetFeature request including but not limited to filters, joins, and aliases.

clearCache

If true, clears existing table data before populating with the query result.