<< All versions

Skill v1.0.0

currentAutomated scan100/100
kendrick-oppong/geoskills/deckgl-large-scale-viz
──Details
PublishedNovember 15, 2026 at 09:40 AM
Content Hashsha256:321ffaddb6b3e18a...
Git SHAfe4762133b94
──Files
Files (1 file, 4.3 KB)
SKILL.md4.3 KBactive
SKILL.md · 72 lines · 4.3 KB

name: deckgl-large-scale-viz description: Use when visualizing very large geospatial datasets in the browser — millions of points, heatmaps, hexbin/H3 aggregation, arcs/flows, trip animation, or 3D extrusion — using deck.gl, typically layered over a MapLibre/Mapbox basemap. metadata: version: "1.0.0"


deck.gl Large-Scale Visualization

When to use this skill

  • Rendering more data than a standard MapLibre/Leaflet GeoJSON layer can handle smoothly (roughly tens of thousands+ of individual features)
  • Heatmaps, hexagonal binning, flow/arc visualizations, animated trips, 3D extrusions
  • "The map freezes when I load this dataset"

Core concepts

deck.gl is a WebGL(2)/WebGPU-based visualization framework, not a full map engine — it renders data layers and is typically composited over a MapLibre (or Google Maps) basemap via @deck.gl/mapbox or the Map interleaving API. Its strength is GPU-driven aggregation and rendering of large binary/typed-array datasets rather than per-feature DOM/SVG elements.

Common layer types and when to use them:

LayerUse for
ScatterplotLayerPoint data at scale (tens of thousands to millions)
HeatmapLayerDensity visualization without discrete binning
HexagonLayer / H3HexagonLayerAggregated binning (counts/values per hex cell) — pairs naturally with spatial-indexing-strategy's H3 guidance
ArcLayer / FlowMapLayer patternOrigin-destination flows
TripsLayerAnimated moving-object playback (vehicle/vessel tracks over time)
GeoJsonLayerModerate-size vector data needing deck.gl's rendering perf without full aggregation
MVTLayerVector tiles rendered through deck.gl instead of a native MapLibre vector layer, when combining with other deck.gl layers in one WebGL context

Checklist

  • [ ] Is data being passed as typed arrays / binary buffers rather than large arrays of JS objects where performance is critical? (deck.gl's binary data API avoids per-feature JS object overhead at very large scale)
  • [ ] Is aggregation (Hexagon/Heatmap) used instead of rendering every raw point when the use case is "show density/pattern," not "identify each point"?
  • [ ] Are layers using updateTriggers correctly so deck.gl only recomputes what changed, instead of reconstructing the full layer array on every render (a common React-integration performance bug)?
  • [ ] For time-animated layers (TripsLayer), is the animation loop driven by requestAnimationFrame outside React's render cycle, not by triggering React state updates every frame?
  • [ ] Is the basemap (MapLibre) and deck.gl overlay properly interleaved (@deck.gl/mapbox MapboxOverlay) so deck.gl layers can render between basemap layers (e.g., under labels) rather than always on top?

Common pitfalls

  • Passing plain JS arrays of feature objects for millions of points: causes garbage-collection pressure and slow layer diffing — switch to binary/typed-array data format for anything beyond ~100k points.
  • Reconstructing the entire layers array every React render without memoization — defeats deck.gl's internal diffing and forces full layer re-creation.
  • Using `ScatterplotLayer` for what should be aggregated density data: at high point counts this is both slower and visually less informative than HexagonLayer/HeatmapLayer.
  • Driving frame-by-frame animation through React state (setState every requestAnimationFrame tick) — causes unnecessary React reconciliation; keep the animation clock outside React and only sync React state at a coarser cadence if needed for UI (e.g., a time slider).

Reference snippets

typescript
import { HexagonLayer } from '@deck.gl/aggregation-layers';
import { MapboxOverlay } from '@deck.gl/mapbox';
const overlay = new MapboxOverlay({
layers: [
new HexagonLayer({
id: 'density',
data: points, // [{position: [lon, lat]}, ...] or binary format for very large N
getPosition: d => d.position,
radius: 200,
elevationScale: 4,
extruded: true,
}),
],
});
maplibreMap.addControl(overlay);

Related skills

  • webgis-engine-selection — deciding deck.gl is the right tool vs a simpler layer
  • spatial-indexing-strategy — H3 binning strategy feeding HexagonLayer/H3HexagonLayer
  • webgis-performance-optimization — broader client-side performance practices
All versions