Skip to main content

Point Cloud

What is a point cloud?​

A point cloud is a set of points in 3D space, each one a measured spot on the surface of an object or a landscape, with x, y and z coordinates and often extra values such as colour, echo strength or a class. Laser scanners (LiDAR), photogrammetry and depth cameras produce them, often millions of points at a time.

A simulated airborne LiDAR point cloud of a 150 by 100 metre site in 3D, coloured by height from blue at the lowest ground through green and yellow to red at the top of the power line towers: rolling ground, a road, two gabled houses and two flat-roofed buildings, round tree crowns, a pond with almost no returns, and a power line with two towers

About 265,000 points from a simulated airborne LiDAR survey, coloured by height (sample data). The dark patches under each roof are ground the laser could not reach, and the pond is almost empty because water absorbs the laser. Try the interactive version.

Key takeaways
  • A point cloud is raw measurement: separate points with no surface joining them, so it has gaps, noise and see-through areas.
  • Every point has a position; LiDAR points also carry intensity, return number, classification and a GPS time.
  • LiDAR finds distance by timing a light pulse there and back: 1 nanosecond of round trip is about 15 cm of range.
  • To read one, colour it by height, intensity or class, filter out noise and ground, and look from above as well as in 3D.
  • Surveys run to millions or billions of points, so display relies on the GPU, level of detail and sensible thinning.

Point clouds are the raw material for terrain maps, flood models, forest inventories, building surveys, self-driving car perception and digital twins. Most are turned into something else in the end, such as a surface, a mesh or a CAD model, but people look at the points first to check what was captured.

What does each point in a point cloud store?​

The position is the only thing every point cloud has. Everything else depends on the sensor and the processing.

AttributeWhat it meansWhere it comes from
X, Y, ZThe point's position, usually easting, northing and elevation in a map projection, or metres from the scannerEvery sensor
IntensityHow strong the echo was. Bright for paint, concrete and grass in near-infrared light; dark for asphalt and waterLiDAR
Return number and number of returnsWhich echo of its pulse this point was ("2 of 3")LiDAR
ClassificationWhat the point hit: ground, vegetation, building, water, wire and so onProcessing, by software or by hand
RGB colourThe colour of the surface, from a cameraPhotogrammetry, or a camera beside the scanner
GPS timeWhen the pulse was fired, to link the point to the flight pathAirborne and mobile LiDAR
Scan angle, flight lineWhich way the scanner was pointing, and which pass the point came fromLiDAR
Normal vectorThe direction the surface faces at the pointCalculated from neighbouring points

The ASPRS LAS specification, the standard LiDAR file format, defines numbered classes so every tool agrees on what "6" means. The ones you will meet most:

Class codeMeaningClass codeMeaning
1Unclassified7Low point (noise)
2Ground9Water
3Low vegetation11Road surface
4Medium vegetation14Wire (conductor)
5High vegetation15Transmission tower
6Building18High noise

How is a point cloud made?​

A point cloud is made by a sensor that measures the distance to many spots on a surface: a laser scanner, overlapping photos or a depth camera.

LiDAR: timing laser pulses​

LiDAR (light detection and ranging) fires short laser pulses and times each echo. Light travels about 30 cm in a nanosecond, and the pulse goes out and comes back, so the range is the speed of light times the round-trip time, divided by two. A target 1,000 m below an aircraft answers in about 6.7 microseconds, and timing it to the nearest nanosecond pins the range to about 15 cm.

How an airborne LiDAR pulse becomes points: an aircraft with a laser scanner, GNSS and IMU fires a pulse that returns three echoes from a tree (canopy top, a branch and the ground) and another that returns once from a flat roof. A formula box gives range = c times round-trip time divided by two, so 1 ns is about 15 cm. A panel lists one point record: X, Y and Z, intensity, return 1 of 3, classification 5 high vegetation, scan angle and GPS time

The range alone is not a point. The scanner also records the angle of its mirror, a GNSS receiver records where the aircraft or vehicle was, and an inertial measurement unit (IMU) records which way it was pointing. Software combines the three to place each echo in map coordinates.

One pulse can give several points. The laser spot is tens of centimetres wide by the time it reaches the ground, so part of it can reflect off leaves while the rest carries on to branches and the ground. Each echo is a return, numbered from the first. This is how LiDAR maps the ground under a forest, where a camera only sees the treetops. A pond, by contrast, returns almost nothing: water absorbs near-infrared light, so bathymetric LiDAR uses green light, which reaches the bottom.

PlatformHow it scansTypical use
Airborne (plane or helicopter)A mirror sweeps the beam across the flight path while the aircraft flies forwardsTerrain and city mapping over hundreds of square kilometres
Drone (UAV)The same, lower and slower, so denserSites, mines, solar farms, corridors
Terrestrial (tripod)The scanner spins on the spot, scanning from several stations that are joined laterBuildings, plant rooms, heritage, crime scenes
Mobile (vehicle or backpack)Spinning scanners on a moving platform, located by GNSS, IMU or SLAMRoads, railways, tunnels, autonomous vehicles
SpaceborneA laser altimeter in orbit, such as the one on NASA's ICESat-2Ice sheets, sea ice, forest height

Photogrammetry: matching photos​

Photogrammetry finds the same features in many overlapping photos and works out, from the change in viewpoint, where each feature sits in 3D. Software based on structure from motion and dense matching turns a few hundred drone photos into a coloured point cloud. It is cheap and gives true colour, but it rarely sees the ground through vegetation, and it struggles on plain, shiny or moving surfaces.

Depth cameras and structured light​

Depth cameras give a point cloud of a room or an object at video rate. Time-of-flight cameras time light like LiDAR but across a whole image at once; structured-light scanners project a pattern and measure how it bends over the surface; stereo cameras compare two views. They work at short range and suit robotics, gesture tracking and scanning small parts.

Point cloud file formats​

Most LiDAR point clouds come as LAS files or their compressed form, LAZ; scanners and 3D software add a few formats of their own.

FormatWhat it isUsed for
LASThe ASPRS binary standard for LiDAR. Stores coordinates as scaled integers plus the attributes aboveAlmost all airborne and mobile LiDAR delivery
LAZLAS compressed without losing anything, often to a fraction of the sizeDownloads and archives
COPCA LAZ file laid out as an octree, so a viewer can fetch just the area and detail it needsStreaming large surveys to the browser
E57The ASTM E2807 standard, which can hold several scans, their positions and their imagesTerrestrial scanners, scan-to-BIM
PLYA simple format from 3D graphics that holds points or meshes, in text or binaryResearch, photogrammetry and 3D printing tools
XYZ, TXT, CSVOne point per line of textQuick exchange of small clouds

Public LiDAR is free to download in many countries. In the USA, the USGS 3D Elevation Program publishes LAZ tiles for most of the country, and NOAA publishes coastal surveys.

How to read and visualise a point cloud​

A point cloud on screen is a swarm of dots, and with no surface to shade, the eye struggles to see depth. Viewers use a handful of techniques to make it readable.

  • Colour by height. A colour ramp from low to high makes terrain, buildings and trees separate at a glance. On sloping ground, colour by height above ground instead, or the slope swamps everything else.
  • Colour by intensity. A greyscale of echo strength looks like a black-and-white photo: road markings, kerbs and different roofs show up even where the height is flat.
  • Colour by class. One colour per class checks the automatic classification: green crowns, red roofs, brown ground. Errors stand out, such as a car marked as building.
  • Colour by return number. First returns of many trace canopy tops; last returns of many show where pulses reached the ground under vegetation.
  • Colour by RGB. Photo colours, if the survey has them, are the easiest for non-specialists to read.
  • Point size. One pixel per point keeps detail; bigger points fill gaps when zoomed in or thinned, but blur fine structure.
  • Cross-sections. A thin slice along a road or through a building, seen from the side, shows heights and clearances better than any 3D view.
  • Top-down rasters. Gridding the points into cells (highest point, mean intensity, class of the top point) turns the cloud into a 2D image, a heatmap, which is easy to read, measure and compare.
  • Depth cues. Eye-dome lighting darkens the edges of anything in front of something further away, which gives a shaded look without a mesh. Rotating the view does the same job.

To describe a point cloud, give the area, the sensor, the density and what it shows: "A 150 × 100 m airborne survey at about 16 pulses per m², showing four buildings, about 40 trees, a road and a power line; the pond has almost no returns."

Point cloud density, accuracy and size​

Density is the number of points, or pulses, per square metre. Accuracy is how close each point is to the truth. A dense cloud can still be inaccurate if the scanner's position was wrong.

The USGS sets quality levels for the US 3D Elevation Program:

USGS quality levelPulse density (at least)Pulse spacing (at most)Vertical accuracy (RMSEz)Pulses per km²
QL08 per m²0.35 m5 cm8 million
QL18 per m²0.35 m10 cm8 million
QL22 per m²0.71 m10 cm2 million
QL30.5 per m²1.41 m20 cm0.5 million

Storing x, y and z as 64-bit numbers takes 24 bytes per point, so 8 million points need 192 MB before any attributes, and a county-wide survey runs to billions of points. Viewers cope in three ways: they send the points to the GPU once and let it draw them, they keep the data in typed arrays rather than JavaScript objects, and for the largest surveys they load a level of detail that matches the zoom, from an octree such as COPC.

Point cloud processing basics​

Most point clouds go through the same steps between capture and use.

  1. Registration. Scans from different positions, or flight lines from different passes, are aligned so the same wall lines up. Algorithms such as iterative closest point (ICP) match overlapping areas.
  2. Noise removal. Points far from their neighbours, such as birds, dust and multipath echoes below the ground, are flagged as noise. A single stray point 50 m up is enough to stretch a height colour scale.
  3. Ground classification. Software separates the ground from everything on it, for example by growing a surface up from the lowest points or by draping a virtual cloth under the upturned cloud.
  4. Further classification. Vegetation, buildings, wires and water are labelled by rules on height above ground, shape and returns, and more and more by machine learning.
  5. Thinning (downsampling). Random sampling keeps 1 in N points but leaves dense areas dense. A voxel grid divides space into cubes and keeps one point per cube, which evens out the density, for example where flight lines overlap.
  6. Products. The ground points become a digital terrain model (DTM); the highest points become a digital surface model (DSM); the difference is height above ground, or the canopy height model (CHM) over forest. Points can also be meshed into a surface or fitted with CAD shapes.

A cross-section through a point cloud: brown ground points along a sloping line, green tree points and red roof points above. A dashed blue line, the DSM, runs over the roof and treetops; a solid brown line, the DTM, runs along the bare ground under them; arrows show height above ground, about 12 m at a tree (the canopy height model) and 7 m at a roof ridge

Gridded models like the DTM are what a 3D surface plot or a contour map shows: one height per cell, which is easier to analyse than raw points but loses overhangs, wires and anything under a canopy.

Where are point clouds used?​

Point clouds are used wherever the exact shape of the ground, a building or an object has to be measured.

FieldWhat the point cloud is for
Surveying and mappingTerrain models, flood and drainage modelling, volumes of stockpiles and earthworks
Autonomous vehicles and robotsSpinning LiDAR finds cars, people and kerbs around the vehicle many times a second
Forestry and ecologyTree height, canopy cover and biomass, from the returns that pass through the canopy
Construction and BIMAs-built surveys, scan-to-BIM models, checking work against the design
UtilitiesPower line sag and vegetation clearance, from wire and vegetation classes
HeritageDetailed records of buildings and sites before restoration or loss
Aerospace and defenceTerrain and obstacle mapping, target recognition, helicopter landing aids
SpaceLaser altimetry of ice sheets from orbit, and maps of the Moon and Mars

Other 3D point data: trajectories and positions​

The same chart that draws a LiDAR survey draws any set of x, y, z points: the positions of a satellite or a launch vehicle from its telemetry, a flight path, GPS tracks, particle tracks in a detector, or sensor readings taken around a 3D space. For trajectories, colour each point by time or speed rather than height, and draw a line through them in order if the order matters. For live data, append new positions as they arrive.

Point cloud vs mesh vs 3D surface plot vs heatmap​

A point cloud keeps every measured point, while a mesh, a surface plot or a heatmap turns the points into something smoother and easier to analyse.

Point cloudMesh3D surface plotHeatmap or raster
What it isSeparate measured pointsTriangles joining points into a surfaceOne height per cell of a regular gridOne value per cell, seen from above
Handles overhangs, wires, layers under canopyYesPartlyNoNo
Gaps and noiseVisible as they areFilled in or smoothedInterpolatedInterpolated or left blank
Good forChecking raw data, classification, measuring clearancesRendering, volumes, 3D printing, CADShowing a measured field or terrain shapeMaps, measuring, comparing two dates
SizeLargestSmallerSmallSmallest

Use the point cloud when you need to see what was really captured; turn it into a surface or raster once you know what you need from it.

Common point cloud visualisation mistakes​

Most point cloud mistakes come from treating gaps, noise or stretched scales as if they were part of the scene.

  • Leaving noise in. A few stray points high in the sky or below ground stretch the axis and the colour scale, so the real scene is squashed into a narrow band of colour. Filter classes 7 and 18, or clip the colour scale to percentiles.
  • Losing precision in 32-bit floats. A 32-bit float has about 7 significant digits. A northing of 4,500,000.12 m stored as one becomes 4,500,000, a 12 cm error, and neighbouring points snap together. Keep coordinates in 64-bit, or subtract a local origin first, as LAS does with its scale and offset.
  • Reading no data as nothing there. Empty strips beside buildings are occlusion, empty water is absorption, and gaps between flight lines are coverage. Show them as no data, not as zero height.
  • Thinning by taking every Nth point in file order. Points are stored in scan order, so every Nth point can follow the scan pattern and leave stripes. Use a random sample or a voxel grid.
  • Mixing up surface and terrain. A DSM includes roofs and trees; a DTM is the bare earth. Flood or slope analysis on a DSM treats buildings as hills.
  • Colouring by absolute height on a slope. On a hillside, the colour shows the hill, not the objects on it. Use height above ground.
  • Hiding vertical exaggeration. Stretching the height axis makes small features visible, but say so, or slopes and heights look steeper than they are.
  • Ignoring units and datums. Mixing feet and metres, or two vertical datums, shifts layers against each other by metres. Check the coordinate reference system in the file header.

How to visualise a point cloud in JavaScript, React or Angular​

The demo below draws a simulated airborne LiDAR survey of about 265,000 points with SciChart.js, and recolours, filters or thins all of them each time you change a control. A seeded random generator builds the scene: ground, a road with painted lines, buildings, trees with multiple returns, a pond, a power line and a few noise points.

Change Colour by to see the same points by height, intensity, class and return number; intensity picks out the road paint, and return number shows the ground under the trees. Use Show to strip out the ground, keep only the bare earth, or put the noise back and watch the scene flatten. Under Points, compare a random 1 in 16 with a 1 m voxel grid. Slide Point size up to fill the gaps. Switch View to the top-down grid for a 2D raster of the same points, where height mode gives a surface model and "Ground only" gives a terrain model. Drag to rotate, scroll to zoom, double-click to reset, and hover a point to read its class and values.

Here is the code for this point cloud. The scene simulation and the HTML controls are plain JavaScript; SciChart.js draws the 3D points and the top-down heatmap.

// A LiDAR point cloud with SciChart.js: about 265,000 points in a 3D scatter chart, coloured by height,
// intensity, class or return number, with filtering, downsampling and a top-down 2D grid view.
const {
SciChart3DSurface,
SciChartSurface,
NumericAxis3D,
NumericAxis,
NumberRange,
Vector3,
XyzDataSeries3D,
ScatterRenderableSeries3D,
PixelPointMarker3D,
QuadPointMarker,
UniformHeatmapDataSeries,
UniformHeatmapRenderableSeries,
HeatmapColorMap,
SciChartJsNavyTheme,
OrbitModifier3D,
MouseWheelZoomModifier3D,
ResetCamera3DModifier,
TooltipModifier3D,
XyzSeriesInfo3D,
CursorModifier,
MouseWheelZoomModifier,
ZoomPanModifier,
ZoomExtentsModifier
} = SciChart;
// or, for npm, import { SciChart3DSurface, ... } from "scichart"

// ASPRS LAS class codes used in this scene, with a colour for each
const CLASSES = [
{ code: 2, name: "Ground", color: "#B98B5E" },
{ code: 11, name: "Road surface", color: "#9AA3AE" },
{ code: 3, name: "Low vegetation", color: "#B6E35B" },
{ code: 5, name: "High vegetation", color: "#2FAE5B" },
{ code: 6, name: "Building", color: "#EF5350" },
{ code: 9, name: "Water", color: "#3FA9F5" },
{ code: 14, name: "Wire", color: "#FFD54F" },
{ code: 15, name: "Tower", color: "#FF9F1C" },
{ code: 7, name: "Noise (low)", color: "#FF4DFF" },
{ code: 18, name: "Noise (high)", color: "#FF4DFF" }
];
const classIndex = new Map(CLASSES.map((c, i) => [c.code, i]));
const RETURNS = [
{ name: "Only return", color: "#50C7E0" },
{ name: "First of many", color: "#3BD16F" },
{ name: "Middle", color: "#F6E05E" },
{ name: "Last of many", color: "#F48420" }
];
const returnKind = (i) => (cloud.nRet[i] === 1 ? 0 : cloud.ret[i] === 1 ? 1 : cloud.ret[i] === cloud.nRet[i] ? 3 : 2);
const HEIGHT_STOPS = ["#2C7BB6", "#00A6CA", "#00CCBC", "#90EB9D", "#FFFF8C", "#F9D057", "#F29E2E", "#E76818", "#D7191C"];

// Colour helpers: turn a 0..1 value into an ARGB integer along a list of colour stops
const hexToRgb = (hex) => [1, 3, 5].map((k) => parseInt(hex.slice(k, k + 2), 16));
const argb = (rgb) => (0xff000000 | (rgb[0] << 16) | (rgb[1] << 8) | rgb[2]) >>> 0;
const heightRgb = HEIGHT_STOPS.map(hexToRgb);
const ramp = (t) => {
const f = Math.max(0, Math.min(1, t)) * (heightRgb.length - 1);
const k = Math.min(heightRgb.length - 2, Math.floor(f));
const a = heightRgb[k], b = heightRgb[k + 1], u = f - k;
return argb([0, 1, 2].map((c) => Math.round(a[c] + (b[c] - a[c]) * u)));
};
const classArgb = CLASSES.map((c) => argb(hexToRgb(c.color)));
const returnArgb = RETURNS.map((r) => argb(hexToRgb(r.color)));

// --- Choosing which points to show: filter by class, then thin out ---
const isNoise = (c) => c === 7 || c === 18;
const isGround = (c) => c === 2 || c === 11 || c === 9;
function selectPoints() {
const filter = ui.filterSelect.value;
const decimate = ui.decimateSelect.value;
const keep = [];
const voxel = decimate[0] === "v" ? Number(decimate.slice(1)) : 0;
const fraction = voxel ? 1 : 1 / Number(decimate);
const voxelsSeen = new Set(); // voxel grid: keep the first point that falls in each cube
for (let i = 0; i < cloud.count; i++) {
const c = cloud.cls[i];
if (filter !== "all" && isNoise(c)) continue;
if (filter === "ground" && !isGround(c)) continue;
if (filter === "above" && isGround(c)) continue;
if (cloud.rank[i] >= fraction) continue;
if (voxel) {
const key =
(Math.floor(cloud.x[i] / voxel) * 1000 + Math.floor(cloud.z[i] / voxel)) * 1000 +
Math.floor((cloud.y[i] + 100) / voxel);
if (voxelsSeen.has(key)) continue;
voxelsSeen.add(key);
}
keep.push(i);
}
return keep;
}

// --- The 3D chart. In SciChart.js 3D, Y is up: here, elevation. X is east and Z is north. ---
const theme = new SciChartJsNavyTheme();
const { wasmContext, sciChart3DSurface } = await SciChart3DSurface.create(ui.chart3d, {
theme,
worldDimensions: new Vector3(300, 60, 200), // 150 m × 100 m of ground, with a little height exaggeration
cameraOptions: { position: new Vector3(-190, 180, -215), target: new Vector3(0, 0, 0) }
});
sciChart3DSurface.xAxis = new NumericAxis3D(wasmContext, {
axisTitle: "East (m)",
labelPrecision: 0,
visibleRange: new NumberRange(0, cloud.width)
});
sciChart3DSurface.yAxis = new NumericAxis3D(wasmContext, { axisTitle: "Elevation (m)", labelPrecision: 0 });
sciChart3DSurface.zAxis = new NumericAxis3D(wasmContext, {
axisTitle: "North (m)",
labelPrecision: 0,
visibleRange: new NumberRange(0, cloud.depth)
});

const dataSeries = new XyzDataSeries3D(wasmContext, { dataSeriesName: "LiDAR points" });
const series = new ScatterRenderableSeries3D(wasmContext, {
dataSeries,
// One pixel per point is the fastest marker for millions of points
pointMarker: new PixelPointMarker3D(wasmContext, { fill: "#FFFFFF" })
});
sciChart3DSurface.renderableSeries.add(series);
sciChart3DSurface.chartModifiers.add(
new OrbitModifier3D(), // drag to rotate
new MouseWheelZoomModifier3D(), // scroll to zoom
new ResetCamera3DModifier(), // double-click to reset the view
new TooltipModifier3D({
// Hover a point to read its class, return, position and intensity
tooltipDataTemplate: (info) => {
if (!(info instanceof XyzSeriesInfo3D) || !info.isHit) return [];
const i = shown[info.dataSeriesIndex];
if (i === undefined) return [];
return [
`${CLASSES[classIndex.get(cloud.cls[i])].name}, return ${cloud.ret[i]} of ${cloud.nRet[i]}`,
`East ${cloud.x[i].toFixed(1)} m, north ${cloud.z[i].toFixed(1)} m`,
`Elevation ${cloud.y[i].toFixed(2)} m, intensity ${cloud.intensity[i].toFixed(2)}`
];
}
})
);

// --- The top-down view: a 2D heatmap with one cell per square metre ---
const map = await SciChartSurface.create(ui.chart2d, { theme });
const mapSurface = map.sciChartSurface;
mapSurface.xAxes.add(new NumericAxis(map.wasmContext, { axisTitle: "East (m)", labelPrecision: 0 }));
mapSurface.yAxes.add(new NumericAxis(map.wasmContext, { axisTitle: "North (m)", labelPrecision: 0 }));
const gridColumns = cloud.width;
const gridRows = cloud.depth;
const heatmapData = new UniformHeatmapDataSeries(map.wasmContext, {
xStart: 0,
xStep: 1,
yStart: 0,
yStep: 1,
zValues: Array.from({ length: gridRows }, () => new Array(gridColumns).fill(NaN)),
containsNaN: true // empty cells (no returns) are drawn transparent
});
const heatmap = new UniformHeatmapRenderableSeries(map.wasmContext, {
dataSeries: heatmapData,
colorMap: new HeatmapColorMap({ minimum: 0, maximum: 1, gradientStops: [] })
});
mapSurface.renderableSeries.add(heatmap);
mapSurface.chartModifiers.add(
new CursorModifier({
showTooltip: true,
tooltipDataTemplate: (infos) => {
const info = infos[0];
if (!info) return [];
const col = Math.floor(info.xValue);
const row = Math.floor(info.yValue);
const value = gridValues[row]?.[col];
const where = `East ${col} m, north ${row} m`;
return Number.isFinite(value) ? [where, cellText(value)] : [where, "No returns in this cell"];
}
}),
new MouseWheelZoomModifier(),
new ZoomPanModifier(),
new ZoomExtentsModifier()
);

// Category colours for the heatmap: the same colour across each category's whole step
const steppedStops = (colors) =>
colors.flatMap((color, k) => [
{ offset: k / colors.length, color },
{ offset: (k + 1) / colors.length - 1e-6, color }
]);
let cellText = (value) => `${value.toFixed(1)}`;
let gridValues = [];

// --- Redraw both views from the current settings ---
let shown = [];
function update() {
const keep = selectPoints();
const mode = ui.colourSelect.value;
// The height colour scale and the vertical axis stretch to the points shown, so stray noise flattens them
let minY = Infinity, maxY = -Infinity;
for (const i of keep) {
if (cloud.y[i] < minY) minY = cloud.y[i];
if (cloud.y[i] > maxY) maxY = cloud.y[i];
}
if (!keep.length) [minY, maxY] = [0, 1];
const colourOf = (i) => {
if (mode === "height") return ramp((cloud.y[i] - minY) / (maxY - minY));
if (mode === "intensity") {
const v = Math.round(255 * Math.min(1, 0.08 + cloud.intensity[i] * 1.05));
return argb([v, v, v]);
}
if (mode === "class") return classArgb[classIndex.get(cloud.cls[i])];
return returnArgb[returnKind(i)];
};

// 3D: typed arrays for the positions, plus per-point metadata for the colour
const n = keep.length;
const xs = new Float64Array(n), ys = new Float64Array(n), zs = new Float64Array(n);
const metadata = new Array(n);
keep.forEach((i, k) => {
xs[k] = cloud.x[i];
ys[k] = cloud.y[i];
zs[k] = cloud.z[i];
metadata[k] = { vertexColor: colourOf(i) }; // ARGB colour of this point
});
shown = keep; // which scene point each chart point is, for the tooltip
dataSeries.clear();
dataSeries.appendRange(xs, ys, zs, metadata);
const pad = Math.max(1, (maxY - minY) * 0.05);
sciChart3DSurface.yAxis.visibleRange = new NumberRange(Math.floor(minY - pad), Math.ceil(maxY + pad));

// 2D: grid the points into 1 m cells, keeping the highest point in each (a surface model seen from above)
if (ui.viewSelect.value === "2d") {
const top = new Int32Array(gridColumns * gridRows).fill(-1);
const sum = new Float64Array(gridColumns * gridRows);
const hits = new Uint32Array(gridColumns * gridRows);
for (const i of keep) {
const col = Math.min(gridColumns - 1, Math.floor(cloud.x[i]));
const row = Math.min(gridRows - 1, Math.floor(cloud.z[i]));
const cell = row * gridColumns + col;
if (top[cell] < 0 || cloud.y[i] > cloud.y[top[cell]]) top[cell] = i;
sum[cell] += cloud.intensity[i];
hits[cell]++;
}
const zValues = [];
for (let row = 0; row < gridRows; row++) {
const values = new Array(gridColumns);
for (let col = 0; col < gridColumns; col++) {
const cell = row * gridColumns + col;
const i = top[cell];
if (i < 0) values[col] = NaN;
else if (mode === "height") values[col] = cloud.y[i];
else if (mode === "intensity") values[col] = sum[cell] / hits[cell]; // mean intensity: an intensity image
else if (mode === "class") values[col] = classIndex.get(cloud.cls[i]);
else values[col] = returnKind(i);
}
zValues.push(values);
}
heatmapData.setZValues(zValues);
gridValues = zValues;
if (mode === "height") {
heatmap.colorMap = new HeatmapColorMap({
minimum: minY,
maximum: maxY,
gradientStops: HEIGHT_STOPS.map((color, k) => ({ offset: k / (HEIGHT_STOPS.length - 1), color }))
});
cellText = (v) => `Highest point ${v.toFixed(2)} m`;
} else if (mode === "intensity") {
heatmap.colorMap = new HeatmapColorMap({
minimum: 0,
maximum: 0.9,
gradientStops: [{ offset: 0, color: "#141414" }, { offset: 1, color: "#FFFFFF" }]
});
cellText = (v) => `Mean intensity ${v.toFixed(2)}`;
} else {
const list = mode === "class" ? CLASSES : RETURNS;
heatmap.colorMap = new HeatmapColorMap({
minimum: -0.5,
maximum: list.length - 0.5,
gradientStops: steppedStops(list.map((c) => c.color))
});
cellText = (v) => `Top point: ${list[Math.round(v)].name}`;
}
}
renderKey(mode, minY, maxY);
ui.readout.textContent = `Showing ${n.toLocaleString("en-GB")} of ${cloud.count.toLocaleString("en-GB")} points`;
}

// Point size: one pixel, or camera-facing squares sized in metres (2 world units = 1 m here)
const SIZES = [0, 0.25, 0.5, 0.75, 1];
function setPointSize() {
const metres = SIZES[Number(ui.sizeSlider.value)];
ui.sizeText.textContent = metres ? `${metres} m` : "1 pixel";
ui.sizeSlider.setAttribute("aria-valuetext", ui.sizeText.textContent);
series.pointMarker = metres
? new QuadPointMarker(wasmContext, { size: metres * 2, fill: "#FFFFFF" })
: new PixelPointMarker3D(wasmContext, { fill: "#FFFFFF" });
}

// A colour key for the current colouring
function renderKey(mode, minY, maxY) {
const swatch = (color, name) =>
`<span style="display:inline-flex; align-items:center; gap:4px"><span style="width:12px; height:12px; ` +
`border-radius:2px; background:${color}"></span>${name}</span>`;
if (mode === "height") {
ui.key.innerHTML = `${minY.toFixed(0)} m <span style="display:inline-block; width:140px; height:10px; ` +
`border-radius:2px; background:linear-gradient(to right, ${HEIGHT_STOPS.join(", ")})"></span> ${maxY.toFixed(0)} m`;
} else if (mode === "intensity") {
ui.key.innerHTML = `Low <span style="display:inline-block; width:140px; height:10px; border-radius:2px; ` +
`background:linear-gradient(to right, #141414, #FFFFFF)"></span> High intensity`;
} else if (mode === "class") {
ui.key.innerHTML = CLASSES.filter((c) => c.code !== 7).map((c) => swatch(c.color, c.code === 18 ? "Noise" : c.name)).join("");
} else {
ui.key.innerHTML = RETURNS.map((r) => swatch(r.color, r.name)).join("");
}
}

function setView() {
const is2d = ui.viewSelect.value === "2d";
ui.chart3d.style.display = is2d ? "none" : "";
ui.chart2d.style.display = is2d ? "" : "none";
update();
if (is2d) mapSurface.zoomExtents();
}

ui.colourSelect.addEventListener("change", update);
ui.filterSelect.addEventListener("change", update);
ui.decimateSelect.addEventListener("change", update);
ui.sizeSlider.addEventListener("input", setPointSize);
ui.viewSelect.addEventListener("change", setView);
setPointSize();
update();

Key points:

  • ScatterRenderableSeries3D with a PixelPointMarker3D draws one pixel per point, the usual marker for large clouds. Swap in a QuadPointMarker with a size in world units for bigger, camera-facing squares.
  • Coordinates go into an XyzDataSeries3D as Float64Arrays, which keeps full precision. Each point's colour is the vertexColor in its metadata, an ARGB integer, so any colouring (height, intensity, class) is a loop over the points.
  • In SciChart.js 3D the Y axis is vertical, so map elevation to Y and the two ground directions to X and Z. worldDimensions sets the box size and so the vertical exaggeration.
  • The top-down view is a 2D UniformHeatmapRenderableSeries with one cell per square metre; containsNaN draws empty cells as transparent, so no-data stays visible.

See it in the demo app: JavaScript 3D LiDAR chart · React 3D LiDAR chart · Angular 3D LiDAR chart. Related: the React real-time 3D surface mesh and the React heatmap chart.

Go deeper: SciChart.js 3D scatter chart documentation, the 3D bubble chart for per-point sizes, and the learning center guides to the 3D surface plot, heatmap and big data visualization. For the industry, see SciChart for aerospace and defence.

Frequently asked questions​

What is a point cloud in simple terms?​

A point cloud is a very large set of dots in 3D space, each dot marking one spot where a scanner or camera detected a surface. Seen together, millions of dots trace the shape of the ground, buildings, trees, a room or a machine part. Each dot has x, y and z coordinates and often extra values such as colour, brightness of the echo or a class like ground or building.

What is LiDAR point cloud data?​

LiDAR point cloud data is the set of 3D points a laser scanner records by timing how long its light pulses take to bounce back. Combined with the scanner's position and orientation, each echo becomes a point with x, y and z coordinates, plus its intensity, its return number, the number of returns from that pulse, a GPS time stamp and, after processing, a class such as ground, vegetation or building. It is usually stored in LAS or compressed LAZ files.

What is the difference between a point cloud and a mesh?​

A point cloud is only the measured points, with no connections between them, so it has gaps and you can see through it. A mesh joins points into triangles that form a continuous surface, which can be shaded, measured for area and volume, 3D printed or used in a game engine or CAD tool. Meshes are made from point clouds by surface reconstruction, which smooths away fine detail and noise.

What file formats are used for point clouds?​

LAS is the standard binary format for LiDAR, defined by ASPRS, and LAZ is its losslessly compressed form. COPC is a LAZ file arranged as an octree so a viewer can stream just the area it needs. E57 (ASTM E2807) is common for terrestrial laser scanners and can hold images too. PLY is popular in 3D graphics and research, and XYZ, TXT or CSV text files hold one point per line.

How many points are in a LiDAR point cloud?​

It depends on the point density and the area. The US Geological Survey's quality level 2 needs at least 2 pulses per square metre, which is 2 million per square kilometre, and quality levels 1 and 0 need at least 8, which is 8 million per square kilometre. Multiple returns from vegetation add more. A city survey easily reaches billions of points, and a single terrestrial scan of a room can hold tens of millions.

How do I visualise a point cloud in JavaScript?​

Use a 3D chart that draws on the GPU, with WebGL and WebGPU, so it can handle hundreds of thousands of points; the demo on this page draws about 265,000. With SciChart.js, put the coordinates into an XyzDataSeries3D as Float64Arrays, give each point a colour in its metadata (by height, intensity or class), and draw it with a ScatterRenderableSeries3D and a PixelPointMarker3D. Add OrbitModifier3D and MouseWheelZoomModifier3D to rotate and zoom. React and Angular apps reach the same code through scichart-react and scichart-angular.

Sources​