populateFromService

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

Populate the OGC API - Features feature collection table with the results of a query. Populates the OgcFeatureCollectionTable with features from the service that match the query parameters. Use the default (empty) QueryParameters to get all features from the service. Specifying an empty Iterable for outfields will result in the default set of outfields being used. Spatial queries (those that specify geometries) must use the Intersects spatial relationship.

Some OGC feature sources allow for query expressions to be written in different languages. The queryLanguage parameter allows you to explicitly specify the language of the QueryParameters.whereClause for the OGC feature query. The value of this parameter may be 'CQL2-TEXT', 'CQL2-JSON', or any other language supported by the target server. For OGC feature services the default language is CQL2-TEXT. For more information, refer to the OGC specification OGC API - Features - Part3. The default value is null, indicating that the QueryParameters.whereClause uses the default language for the source.

Return

A Result that returns a FeatureQueryResult type.

Since

200.6.0

Parameters

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

An Iterable containing the names of the fields to return from the query.

queryLanguage

The query language that the QueryParameters.whereClause is written in.