Skip to content

feat(examples): experimental GeoArrow overlay example - #698

Merged
kylebarron merged 3 commits into
mainfrom
kyle/geoarrow-overlay-example
Oct 8, 2026
Merged

kylebarron merged 3 commits into
mainfrom
kyle/geoarrow-overlay-example

Conversation

@kylebarron

Copy link
Copy Markdown
Member

Note

This PR was written by Claude (Claude Code), not by @kylebarron.

Adds an experimental example that draws deck.gl-geoarrow points on top of a deck.gl-raster COG in the same deck.gl instance: 3.4 million Speedtest by Ookla mobile performance tiles (Q2 2026) over the EOxCloudless 2024 global imagery COG.

GeoArrow overlay example

What it does

  • Raster: COGLayer with the EOxCloudless COG (EPSG:4326), reprojected to Web Mercator on the GPU and interleaved beneath MapLibre's borders and labels.
  • Vector: reads Ookla's own Parquet file on S3, unmodified, with parquet-wasm. ParquetFile.fromUrl(...).stream({ columns }) fetches only the 3 columns the map needs (28 MB of the 185 MB file), with one range request per row group. Each row group becomes one Arrow record batch and one GeoArrowScatterplotLayer.
  • Geometry: the tile_x/tile_y centroid columns become a GeoArrow point column in the separated struct<x, y> layout without copying. deck.gl-geoarrow then interleaves it on the CPU before uploading.
  • Filter: a log-scale download speed slider drives a DataFilterExtension, so filtering runs on the GPU. The scale is logarithmic because speeds have a long tail: the median is ~70 Mbps and the top 1% are over 850 Mbps.
  • Data layout note: the panel explains, highlighted while points load, that Ookla's file isn't chunked for visualization. Its 4 row groups hold up to 1,048,576 rows each and each covers a large part of the world, so nothing is drawn until ~9 MB has arrived.
  • Local copy: ?url= loads a local copy of the same file instead. Over a ~1–2 MB/s link the S3 read takes 25–37 s, while a local copy loads in 0.4 s. The README has the steps. The server must support suffix range requests, which parquet-wasm uses for the footer: serve does and http-server doesn't.

Also:

  • ExternalLink, shared by all examples, now renders display: inline. Chakra v3's Link defaults to inline-flex, so a wrapped link pushed the punctuation after it onto its own line.
  • Docs: a card under "Experimental Examples". The docs workflow already builds everything in examples/experimental/.

No library code changes.

Upstream notes

Found while building this. None of them block the example.

  • geoarrow-js 0.3.3's types only model interleaved coordinates (Coord = InterleavedCoord), although isPointData accepts separated ones at runtime, so getPosition needs a cast.
  • deck.gl-geoarrow's assignAccessor only forwards float columns and FixedSizeList<Uint8> colors as binary attributes, and silently drops integer columns. That's why the filter value is a Float32 column.
  • parquet-wasm panics (RuntimeError: unreachable) instead of rejecting when a server answers its footer suffix range with 416.

Testing

  • pnpm typecheck (example and docs), biome check, and pnpm build.
  • In headed Chrome: all 3,381,216 points render over the COG; dragging the slider filters on the GPU (for example 32–178 Mbps); the hover tooltip shows download speed and filtered-out points can't be picked; the layout note is orange while loading and gray afterwards; a local copy loads in 0.4 s.

Written by Claude on behalf of @kylebarron.

🤖 Written by Claude Code

kylebarron and others added 3 commits October 8, 2026 10:29
… punctuation

Chakra v3's Link defaults to `display: inline-flex`. When a long link
wraps, the link becomes a full-width box, so punctuation right after it
(a comma or period in attribution text) starts the next line on its own.
ExternalLink has no icon to align, so plain `inline` loses nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Show deck.gl-raster and deck.gl-geoarrow layers working together in one
deck.gl instance: 3.4 million Speedtest by Ookla mobile performance
points over the EOxCloudless 2024 global imagery COG.

- The points come from Ookla's own Parquet file on S3, unmodified.
  parquet-wasm range-reads only the 3 columns the map needs (28 MB of
  the 185 MB file), one row group per Arrow record batch and layer.
- The `tile_x`/`tile_y` centroid columns become a GeoArrow point column
  in the separated `struct<x, y>` layout without copying.
- A log-scale download speed slider drives a DataFilterExtension, so
  filtering runs on the GPU. Speeds have a long tail (median ~70 Mbps,
  top 1% over 850 Mbps), which a linear slider would squeeze into its
  first tenth.
- `?url=` loads a local copy of the same file instead; over a slow link
  the S3 read takes 25+ s, while a local copy loads in under a second.

Also list it with a card on the docs examples page. The docs workflow
already builds everything under `examples/experimental/`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s load

Ookla's file packs 3.4M rows into 4 row groups of up to 1,048,576 rows,
each covering a large part of the world. A row group is the smallest
unit parquet-wasm can read, so nothing can be drawn until ~9 MB has
downloaded, and a viewer can't fetch only the area in view.

Say so in the panel, highlighted while points are loading, with the
numbers read from the Parquet footer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the feat label Oct 8, 2026
@kylebarron
kylebarron merged commit 70c31af into main Oct 8, 2026
3 checks passed
@kylebarron
kylebarron deleted the kyle/geoarrow-overlay-example branch October 8, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant