Package-level declarations

Types

Link copied to clipboard
data class OsmBuilding(val id: String, val outerRing: List<Position>, val innerRings: List<List<Position>> = emptyList(), val height: Double, val minHeight: Double = 0.0, val name: String? = null, val tags: Map<String, String> = emptyMap())

One OSM building feature, normalized to a simple extrusion model: an outer ring (and optional holes), with height meters above minHeight.

Link copied to clipboard
open class OsmBuildingsLayer(var source: TiledFeatureSource = OverpassBuildingsSource(), val tileZoom: Int = 15, val tileRadius: Int = 4, val maxLoadedTiles: Int = 256, val maxConcurrentFetches: Int = 2, val useOsmColors: Boolean = true, val useBatchedRendering: Boolean = true, displayName: String? = "OSM Buildings") : AbstractLayer, VectorLayer

Renders OpenStreetMap-derived schematic 3D buildings. Footprints + height tags are fetched on demand via a TiledFeatureSource (defaults to OverpassBuildingsSource) and cached per slippy-map tile.

Link copied to clipboard
class OsmBuildingsTile(buildings: List<OsmBuilding>, var attributes: ShapeAttributes, useOsmColors: Boolean = false, var shadowMode: ShadowMode = ShadowMode.ENABLED, displayName: String? = null) : AbstractRenderable

Renders every building of one slippy-map tile as a single batched mesh — one VBO + one EBO per tile per Globe.State, regardless of building count. Drop-in replacement for the legacy "one earth.worldwind.shape.Polygon per building" path that OOMs the Adreno KGSL shared-memory pool on dense urban tiles (~500 buildings × 4 buffers × ≥1-page mmap exhausts the kernel's GPU buffer-object slots by count long before raw bytes become a concern). Per-tile batching is the approach Cesium 3D Tiles b3dm, Mapbox fill-extrusion, and deck.gl SolidPolygonLayer all use for the same reason.

Link copied to clipboard
object OsmColors

Maps OSM tags to a wall Color. Tries, in order:

Link copied to clipboard
object OsmHeight

Resolves an OSM tag bag to a (minHeight, height) pair in meters.

Link copied to clipboard
class OverpassBuildingsSource(val endpoint: String = "https://overpass-api.de/api/interpreter", val timeout: Int = 25) : TiledFeatureSource

Fetches OSM building footprints from a public Overpass API endpoint.