developmentseed / developmentseed/cng-sandbox
feat(frontend): WebGPU point layer for large GeoParquet datasets
- Dominant language
- TypeScript
- Stars
- 3
- Forks
- 0
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
## Problem
Large point GeoParquet datasets (>1M points) choke MVT rendering via tipg — tiles get huge, render stalls, and interactivity suffers. Today CNG always serves vectors as MVT regardless of geometry type or count.
## Proposal
Add an optional WebGPU-backed scatter layer for point-heavy GeoParquet datasets, inspired by [Geospatial Atlas](https://github.com/do-me/geospatial-atlas) (fork of Apple's Embedding Atlas). Their engine handles ~200M points in the browser.
When a dataset is detected as points-only and exceeds a threshold (e.g., 100k features), offer WebGPU scatter as the render mode instead of MVT.
## Scope
- Detect point-only GeoParquet at ingestion; persist a `render_hint` on the dataset row
- Add a new frontend layer type that reads GeoParquet directly via DuckDB WASM (or a direct HTTPRangeReader)
- Fallback to MVT for browsers without WebGPU (WebGL 2)
- Surface as a toggle in the map view
## Out of scope
- Replacing MVT for non-point or small datasets
- Backend changes to tipg
## References
- https://github.com/do-me/geospatial-atlas
- https://apple.github.io/embedding-atlas
Contributor guide
Research direction
Start by tracing the dataset ingestion path and map view, then review the Geospatial Atlas references and compare DuckDB WASM with a direct HTTPRangeReader. Done means point-only, large GeoParquet datasets persist a render hint, expose a WebGPU scatter toggle, fall back to MVT with WebGL 2, and leave small or non-point datasets unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100