WfsTiledFeatureSource

class WfsTiledFeatureSource(val serviceAddress: String, val typeName: String, val serviceMetadata: String? = null, val cqlFilter: String? = null, val maxFeaturesPerTile: Int? = null, val sortBy: String? = null, val pageSize: Int? = null, val clientConfig: HttpClientConfig<*>.() -> Unit = {}) : TiledFeatureSource

TiledFeatureSource that fetches WFS features per slippy-map tile — Strategy 2 (cache-through). Each fetchTile issues a GetFeature bounded by the tile's Sector (so the server returns only that tile's features, capped at maxFeaturesPerTile) and decodes the response via WfsFeatureDecoder. Wrap in earth.worldwind.layer.cache.CachedTiledFeatureSource for the GeoPackage-backed coverage cache; drive with earth.worldwind.layer.TiledFeatureLayer.

Unlike WfsBulkFeatureSource (one GetFeature for the whole layer) this never downloads more than one viewport's worth of tiles, so it suits layers too large to fetch whole (e.g. global OSM water polygons).

Constructors

Link copied to clipboard
constructor(serviceAddress: String, typeName: String, serviceMetadata: String? = null, cqlFilter: String? = null, maxFeaturesPerTile: Int? = null, sortBy: String? = null, pageSize: Int? = null, clientConfig: HttpClientConfig<*>.() -> Unit = {})

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val clientConfig: HttpClientConfig<*>.() -> Unit
Link copied to clipboard
Link copied to clipboard

Server-side COUNT/MAXFEATURES cap per tile request.

Link copied to clipboard

When set, fetch a dense tile in stable pages of this size instead of one request (use with sortBy). Null = single request per tile.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Sortable property (typically the feature id) enabling strictly-stable STARTINDEX paging when pageSize is set. Omit for a single unpaged request per tile (relies on the server's order).

Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()

Release any resources held by the source (HTTP client, etc.). Idempotent default no-op.

Link copied to clipboard
open suspend override fun fetchTile(z: Int, x: Int, y: Int, sector: Sector): Flow<CachedFeatureRow>?
Link copied to clipboard
open suspend fun tryReadCachedTile(z: Int, x: Int, y: Int, sector: Sector): Flow<CachedFeatureRow>?

Cache-only fast-path read for (z, x, y). Default returns null — a plain network source has no cache to consult. Cache-backed sources override to read their store without going through the network-fetch concurrency budget. Empty flow is the negative-cache sentinel ("fetched, no features"); null is a true miss.