Files
Qiusheng Wu ef1c4a6317 feat(notebook): add a raster and vector example notebook (#3286)
* feat(notebook): add a raster and vector example notebook

Add Explore_GeoLibre.ipynb beside Welcome.ipynb. It covers raster
visualization and terrain analysis, vector styling and GeoPandas
analysis, and, on desktop, layer management and processing tools.

The kernel client had no way to add rasters, so add add_tile_layer,
add_cog, add_raster and run_whitebox_tool, with the matching scripting
commands. Seed the new notebook in both the web and desktop builds.

* fix(notebook): address review comments on the raster commands

Accept only known tile options, since the store spreads them over the
validated URL. Keep the COG engine and insertion options, and report
invalid base64 by command name.

In the example notebook, wait only for layers added by the current
command, and clean up by what Part 3 added, so a rerun cannot pick up an
old result and a user's own layers are safe.

* fix(notebook): point layer warnings at the caller's cell

Warnings from add_geojson and the raster methods pointed inside the
client after they moved to _add_layer. Also reject non-bytes input to
add_raster up front.

* Address CodeRabbit review feedback

- Pass add_raster's colormap as layer state, so a paletted GeoTIFF on the
  ArcGIS or Cesium renderer honors it, as the COG command does.
- Keep beforeLayerId and metadata in the tile options; the app API
  validates metadata.
- Mark the Whitebox docs example as desktop-only, since add_raster
  returns None on the web.

* Address review feedback

- Gate Part 3 of the notebook on every layer id it uses, since a relay
  timeout can leave any of them None, and reword the skip message.
- Raise a clear error when rescale is not a (min, max) pair.
- Forward zoomTo and beforeLayerId in addRasterBytes.
- Scope the docs note on layer ids to desktop JupyterLab kernels and
  guard the Whitebox example.
2026-10-30 11:18:31 -04:00
..