PointCloudLayer

open class PointCloudLayer(displayName: String? = "Point Cloud") : AbstractLayer

Renders a standalone LAS/LAZ point cloud on the globe. Loading and parsing happen off the render thread; the first frame captures the Globe and georeferences the cloud into GPU-resident chunks, then every frame enqueues them through the engine's existing point path (DrawableTilePoints + Ogc3dTilesPointsProgram + PointCloudContent) — the same size-attenuated round splats the 3D-Tiles .pnts reader draws.

Georeferencing: geographic and WGS84/UTM coordinate systems are detected from the file's GeoKey VLR and converted automatically. For any other CRS, set projection to map native (x, y, z) to a globe Position; otherwise the coordinates are assumed geographic and a warning is logged.

Compressed .laz files need a LazChunkDecoder installed via earth.worldwind.formats.las.LasDecoderRegistry — loadLas fails clearly if it's missing.

Constructors

Link copied to clipboard
constructor(displayName: String? = "Point Cloud")

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

How the cloud's Z is interpreted. AltitudeMode.ABOVE_SEA_LEVEL (default) treats it as orthometric height — how nearly all LiDAR ships — and adds the geoid offset so it shares the globe's datum and rests on terrain (terrain is elevation + geoid.getOffset; a raw orthometric Z would float by the geoid separation). AltitudeMode.ABSOLUTE treats Z as already-ellipsoidal. Ground-relative modes don't apply — a cloud's coordinates are absolute.

Link copied to clipboard

Metres to raise (or lower) the whole cloud, on top of altitudeMode. Applied live at draw time along the local up axis, so a change takes effect on the next redraw (the caller triggers it) with no reload. Nudge up to clear coarse terrain, correct a residual datum mismatch, or lift clear of the surface.

Link copied to clipboard
open override var displayName: String?
Link copied to clipboard
open override var isDynamic: Boolean
Link copied to clipboard
open override var isEnabled: Boolean
Link copied to clipboard
open override var isPickEnabled: Boolean
Link copied to clipboard
open override var maxActiveAltitude: Double
Link copied to clipboard

Hard cap on rendered points; the cloud is uniformly stride-decimated above it.

Link copied to clipboard
open override var minActiveAltitude: Double
Link copied to clipboard
open override var opacity: Float
Link copied to clipboard

On-screen splat diameter in pixels at 1 m eye depth; attenuates with distance.

Link copied to clipboard
var projection: (x: Double, y: Double, z: Double) -> Position?

Optional native-CRS → globe Position mapping. When set it OVERRIDES the file's detected CRS, so it can reproject a coordinate system the engine doesn't know or re-place/re-base the cloud (e.g. drop it onto a flat globe). Applied per point.

Link copied to clipboard

Cascade-shadow participation. Standalone clouds default to none.

Functions

Link copied to clipboard
fun dispose()

Frees the coroutine scope. Call when the layer is permanently discarded.

Link copied to clipboard
open override fun getUserProperty(key: Any): Any?
Link copied to clipboard
open override fun hasUserProperty(key: Any): Boolean
Link copied to clipboard
Link copied to clipboard
suspend fun loadLas(bytes: ByteArray)

Loads a LAS/LAZ file from raw bytes. Suspends on the parse; the result renders on a subsequent frame once the globe is available for georeferencing.

suspend fun loadLas(url: String)

Loads a LAS/LAZ file from an http(s) URL.

Link copied to clipboard
open override fun putUserProperty(key: Any, value: Any): Any?
Link copied to clipboard
open override fun removeUserProperty(key: Any): Any?
Link copied to clipboard
open override fun render(rc: RenderContext)