Package-level declarations

Types

Link copied to clipboard
open class AbsentResourceList<T>(maxTrys: Int, minCheckInterval: Duration)

Provides a collection to keep track of resources whose retrieval failed and when retrieval may be tried again.

Link copied to clipboard
abstract class AbstractSource

AbstractSource instances are intended to be used as a key into a cache or other data structure that enables sharing of loaded resources.

Link copied to clipboard
abstract class AbstractTile(val sector: Sector)
Link copied to clipboard
open class BasicPool<T> : Pool<T>
Link copied to clipboard

Sibling of FloatArrayPool for ByteArrays; identical contract.

Link copied to clipboard
typealias CachedLayerOpener = suspend (contentManager: ContentManager, entry: CacheEntry, cachePolicy: CachePolicy) -> Any?

One reconstruction recipe — given a ContentManager and a CacheEntry, produce a layer/coverage/null. Implementations open the appropriate store on contentManager, wrap a fresh network source in the matching cache decorator, and return the assembled layer/coverage. To open in strict cache-only mode, call setOfflineOnly on the returned object.

Link copied to clipboard

Registry of (dataType, serviceType) → CachedLayerOpener. The same key pair the 2.x cache surface uses for dispatch — WmsImageLayer and WmsElevationCoverage both advertise "WMS" but are disambiguated by the data_type discriminator.

Link copied to clipboard
interface ContentManager

Persistent cache for vector-data and tile-pyramid layers. One ContentManager instance manages many independent content entries (each keyed by contentKey), each backed by one GeoPackage table or table set.

Link copied to clipboard
class ContourInfo(val polygons: List<List<Location>>, val pole: Pole, val poleIndex: Int, val iMaps: List<Map<Int, Intersection>>)
Link copied to clipboard
class Earcut

Ear-clipping polygon triangulator — a Kotlin port of mapbox/earcut (ISC licence). It is the triangulator MVT renderers (Mapbox GL, MapLibre, deck.gl) use for polygon fills: far cheaper than a GLU-style sweep-line tessellator because it builds only a small doubly-linked node list (no half-edge mesh), and it stays robust on real-world rings (holes, near-collinear / self-touching edges) via its hole-bridging and cureLocalIntersections / splitEarcut fallbacks.

Link copied to clipboard

Cross-thread reusable FloatArray pool. Single-queue, no size buckets — the queue converges to the largest-seen size, smaller acquirers get an oversized buffer (callers use their own valid count when reading/writing).

Link copied to clipboard
class Intersection(var visited: Boolean = false, var forPole: Boolean = false, var index: Int = -1, var linkTo: Int = -1)
Link copied to clipboard
class IntList(initialCapacity: Int = 16)

Primitive-Int dynamic list. Drop-in replacement for MutableList<Int> in hot loops where boxing each Int to a JVM Integer causes meaningful GC pressure. Used for shape index buffers (outlineElements, topElements, etc.) which can hold thousands of indices and are repopulated on every geometry assemble.

Link copied to clipboard
open class Level

Represents a level of a specific resolution in a LevelSet.

Link copied to clipboard
open class LevelSet

Multi-resolution, hierarchical collection of tiles organized into levels of increasing resolution. Applications typically do not interact with this class.

Link copied to clipboard
open class LevelSetConfig

Configuration values for a multi-resolution, hierarchical collection of tiles organized into levels of increasing resolution.

Link copied to clipboard
actual object Logger
expect object Logger
actual object Logger
actual object Logger
actual object Logger

Logs selected message types to the console.

Link copied to clipboard
open class LongLruMemoryCache<V : Any>(val capacity: Long, lowWater: Long = (capacity * 0.75).toLong())

LRU memory cache keyed by primitive Long, eliminating per-lookup boxing overhead that occurs with LruMemoryCache backed by a generic HashMap.

Link copied to clipboard
open class LruMemoryCache<K, V> @JvmOverloads constructor(val capacity: Long, lowWater: Long = (capacity * 0.75).toLong())

LRU cache using an intrusive doubly-linked list for O(1) eviction. The list head is the most recently used entry, the tail is the least recently used; eviction walks tail→head until the cache drops below lowWater and has room for the requested allocation. trimToAge uses the same tail walk and stops at the first entry whose Entry.lastUsed crosses the threshold.

Link copied to clipboard
sealed class NumericArray
Link copied to clipboard
enum Pole : Enum<Pole>
Link copied to clipboard

Splits polygons that cross the antimeridian and/or contain a pole.

Link copied to clipboard
interface Pool<T>

Pool provides an interface for managing a pool of object instances.

Link copied to clipboard
class PrioritySemaphore(maxPermits: Int)

Priority-ordered permit pool. acquire suspends until a permit is free; when multiple acquirers are waiting, release wakes the one with the highest priority (= largest Double). Replaces kotlinx.coroutines.sync.Semaphore, which is FIFO — under a fast pan with hundreds of queued tile-fetch requests, FIFO leaves the camera-relevant (or coarse-fallback) tile buried behind seconds of stale prior-frame requests. There is no in-flight cancellation: this reorders only the WAIT line, not the running set. Cesium 3D Tiles uses the same pattern in RequestScheduler.update().

Link copied to clipboard

Interface for resource post-processing

Link copied to clipboard

The lane a retrieval runs on: LOCAL (in-bundle resources, local files and cache-only reads) or REMOTE (anything fetched from a remote server — map tiles, remote icons, DEM tiles, any URL).

Link copied to clipboard

Shared, key-agnostic retrieval-lane bookkeeping. Used by every poll-per-frame retriever that has a local cache in front of a remote source — the image earth.worldwind.render.RenderResourceCache (keyed by ImageSource) and the gridded-coverage earth.worldwind.globe.elevation.coverage.AbstractTiledElevationCoverage (keyed by tile Long).

Link copied to clipboard

Next phase for a cache-backed source — see RetrievalLanes.planNetworkBound.

Link copied to clipboard

Polyline/ring simplification shared by the MVT decoder (earth.worldwind.layer.mvt.MvtGeometry) and the tiled WFS feature path (earth.worldwind.layer.FeatureRenderer).

Link copied to clipboard
class ScratchPool<T : Any>(factory: () -> T)

Sequential scratch pool: hand out T instances in order during a single assembly pass, then reset the cursor at the start of the next pass to reuse the same instances. Distinct from BasicPool which is acquire/release-style — here callers don't release individually because they keep the acquired instances alive in a result list until the entire pass completes.

Link copied to clipboard

Provides utilities for determining the Sun geographic and celestial location.

Link copied to clipboard
expect class SynchronizedList<E> : MutableList<E>
actual typealias SynchronizedList<E> = ArrayList<E>
actual typealias SynchronizedList<> = ArrayList<E>
Link copied to clipboard
expect class SynchronizedPool<T> : Pool<T>
actual class SynchronizedPool<T> : Pool<T>

Kotlin/Native threads are real - decode workers and the render thread share these pools, so acquire/release must lock or two consumers can be handed the same pooled instance.

actual open class SynchronizedPool<T> : Pool<T>
actual class SynchronizedPool<T> : BasicPool<T> , Pool<T>

JS use BasicPool instead of SynchronizedPool

Link copied to clipboard
open class Tile : AbstractTile

Geographically rectangular tile within a LevelSet, typically representing terrain or imagery. Provides a base class for tiles used by tiled image layers and elevation models. Applications typically do not interact with this class.

Link copied to clipboard
interface TileFactory

Factory for delegating construction of Tile instances.

Link copied to clipboard
class UrlTemplate(val template: String)

Slippy-map URL template with the WorldWind dialect of substitution tokens:

Properties

Link copied to clipboard
expect val AssetResource.assetPath: String
actual val AssetResource.assetPath: String
actual val ERROR CLASS: Symbol not found for AssetResource.assetPath: ERROR CLASS: Unresolved name: originalPath
actual val AssetResource.assetPath: String
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun <T : Any> ContentManager.open(category: CacheCategory<T>, cachePolicy: CachePolicy = CachePolicy.UNBOUNDED): List<T>

Bulk-open every cached entry whose CacheEntry.dataType matches category. Return type follows the category's phantom witness:

Link copied to clipboard
inline suspend fun <T : ElevationCoverage> ContentManager.openElevationCoverage(contentKey: String, cachePolicy: CachePolicy = CachePolicy.UNBOUNDED): T?

Open contentKey as an elevation coverage narrowed to T. Returns null when the key is absent, registered as a layer (use openLayer), or the materialized type doesn't match T. Bound is the broad ElevationCoverage interface for symmetry with openLayer's Layer bound; today only TiledElevationCoverage subtypes are reachable from cache, so non-tiled-typed callers always get null.

Link copied to clipboard
inline suspend fun <T : Layer> ContentManager.openLayer(contentKey: String, cachePolicy: CachePolicy = CachePolicy.UNBOUNDED): T?

Open contentKey as a layer narrowed to T. Returns null when the key is absent, unregistered, backed by an elevation coverage (use openElevationCoverage), or the materialized type doesn't match T.

Link copied to clipboard
inline suspend fun <T> PrioritySemaphore.withPermit(priority: Double, block: () -> T): T

Acquire a permit at priority, run block, then release — the priority analogue of kotlinx.coroutines.sync.withPermit. Higher priority is served first when the pool is contended; equal priorities keep FIFO order.