<< All versions
Skill v1.0.0
currentAutomated scan100/100kendrick-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:
| Layer | Use for | |
|---|---|---|
ScatterplotLayer | Point data at scale (tens of thousands to millions) | |
HeatmapLayer | Density visualization without discrete binning | |
HexagonLayer / H3HexagonLayer | Aggregated binning (counts/values per hex cell) — pairs naturally with spatial-indexing-strategy's H3 guidance | |
ArcLayer / FlowMapLayer pattern | Origin-destination flows | |
TripsLayer | Animated moving-object playback (vehicle/vessel tracks over time) | |
GeoJsonLayer | Moderate-size vector data needing deck.gl's rendering perf without full aggregation | |
MVTLayer | Vector 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
updateTriggerscorrectly 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 byrequestAnimationFrameoutside React's render cycle, not by triggering React state updates every frame? - [ ] Is the basemap (MapLibre) and deck.gl overlay properly interleaved (
@deck.gl/mapboxMapboxOverlay) 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 (
setStateeveryrequestAnimationFrametick) — 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 NgetPosition: 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 layerspatial-indexing-strategy— H3 binning strategy feedingHexagonLayer/H3HexagonLayerwebgis-performance-optimization— broader client-side performance practices