Skip to main content

Wireless Coverage — LiDAR to Tower Siting

Wireless Coverage turns a USGS 3DEP LiDAR point cloud over San Francisco into ranked candidate cell-tower sites, using GeoBrix on Databricks. LiDAR returns become DSM / DTM / CHM surfaces. The surfaces are indexed to H3. Exact H3 line-of-sight viewsheds score each candidate site. It comes in two flavors. One is a Lakeflow pipeline that runs the whole flow as a scheduled job. The other is an interactive notebook series that walks through each step and the GeoBrix functions behind it.

Executed output — full San Francisco​

These screenshots come from the executed Notebook Series, run end to end over the whole San Francisco AOI (DEMO=False). The committed notebooks ship the smaller Golden Gate Park demo (DEMO=True).

First, the surface stack over all of San Francisco: bare earth (DEM) beside the full surface (DSM). Buildings and canopy read as the difference between them:

Full San Francisco — DEM (bare earth) vs DSM (surface: buildings + canopy) elevation bands at H3 resolution 10, side by side (Part 3a). The surface model rises above bare earth over downtown and the ridgelines.

Zooming into one neighborhood, Part 3a cross-checks that the H3 grid faithfully summarizes the underlying 1 m pixels. A hex reads as the color of the pixels beneath it:

Golden Gate Park detail — the 1 m-pixel CHM raster beneath the H3-gridded maximum canopy height, same window and colormap, so a hex reads as the color of the pixels it summarizes (Part 3a).

Finally, the Golden Gate Park demo makes the ranked sites legible. Part 4 scores each candidate by how many res-12 cells it can see, so the best sites rise to the top:

Top-10 tower sites by coverage over Golden Gate Park — each site's res-12 H3 line-of-sight viewshed and 2.5 km buffer, with the sited towers marked (Part 4).


A Wireless Coverage pipeline: a Lakeflow Declarative Pipeline (SDP) plus a post-pipeline tower-siting task. A Databricks Asset Bundle packages it, and it runs entirely on Serverless compute with the GeoBrix Python API.

This is the production counterpart to the notebook series (see the other tab). It uses the same San Francisco AOI and USGS 3DEP LiDAR sources. It runs as a scheduled medallion pipeline instead of one-off notebook outputs. A land downloader task stages the data. The pipeline then cascades bronze → silver → gold through declared table-to-table dependencies. A siting task runs the H3-native tower analysis. A validate notebook confirms all outputs.

wc_lidar_pts is a streaming table, so each update reads only the .laz tiles inventoried since the last one. Some setting changes need a reset, listed in the bundle README.

View on GitHub

examples/notebooks/wireless-coverage/lakeflow — the bundle, pipeline transformations, siting task, validation notebook, and full setup instructions live here. See its README for deploy/run steps, prerequisites, and configuration notes.

Runs on Serverless

Lakeflow Spark Declarative Pipelines run DBR 19 on the PREVIEW channel; the examples use it with the env6 wheel. The pipeline and its land and siting tasks use geobrix[vizx,stac] from the env6 wheel, with the Overture CLI as a separate entry. Each takes it as a single pip dependency entry. The code uses the rasterx and gridx Python API with no JAR, on Serverless throughout. To fall back to the CURRENT channel (DBR 18), set pipeline_channel=CURRENT, point gbx_wheel at the env5 wheel, and set the job environment_version to 5. Check the Lakeflow runtime channel versions when you deploy. The bundle defaults to Serverless. For heavier runs (notably full San Francisco) switch the pipeline and job tasks to classic compute (serverless: false + a cluster spec) for dedicated memory and throughput. See Surfaces & Levels.

How it works: from staged LiDAR to ranked tower sites​

Wireless Coverage series — config_nb → 01 → 02a/02b → 03a → 03b → 04

A scheduled run takes raw USGS 3DEP LiDAR .laz files through six stages:

  1. Land — a downloader task stages USGS 3DEP LiDAR EPT nodes and Overture water polygons onto a Unity Catalog Volume. Nothing is interpreted yet — data just arrives.
  2. Bronze — inventory — Auto Loader records one row per .laz file as it appears, so re-runs pick up only newly staged data.
  3. Silver — surface stack — GeoBrix read_paths reads the .laz files as they arrive on the inventory stream, so each update parses only the newly staged tiles. The pipeline tile-indexes the classified returns in the streaming table wc_lidar_pts. It bins them into 1 m DSM and TIN DTM rasters per tile. The rst_chm function derives the Canopy Height Model.
  4. Gold — H3 grids — the surfaces are reprojected to EPSG:4326, isobanded, and indexed to H3 cells at resolution 10. Each table carries a stable res-9 join key so downstream consumers join on one column.
  5. Siting — a post-pipeline Spark task runs the H3-native tower-siting analysis. The analysis uses a res-9 candidate lattice, a coarse quick-pass to rule out weak sites, and exact res-12 H3 line-of-sight viewsheds on survivors. The h3_viewshed_towers function distributes the viewsheds, with one tower per Spark task.
  6. Validate — a final notebook task confirms all output tables are populated and spot-checks quality assertions.

Each stage reads only the one before it. The pipeline declares these as table-to-table dependencies. Lakeflow then builds the lineage graph, runs stages in order, and recomputes only what changed.

What it uses from GeoBrix​

  • Bronze: a plain Auto Loader binaryFile stream lists the staged .laz files (laz_inventory); it reads no point data.
  • Silver: read_paths runs the lidar_gbx reader over the files that arrive on the inventory stream. The output is wc_lidar_pts, a streaming table: each update reads only the tiles inventoried since the last one. It has one row per return plus _source_path, the file it came from. The rows are spread over 512 tasks. With on_error="skip", the reader skips a file that cannot be decoded and writes a warning in the executor logs. The pipeline keeps going instead of failing the update. The tiles never change once landed, so the example does not need declare_ingest. See Lakeflow SDP for the pipeline setup.
  • Surfaces and grids: RasterX on Serverless: bin_points_tiled, rst_dtmfromgeoms_agg and rst_chm build the surfaces; rst_transform, rst_clip, rst_isoband and gbx_rst_h3_rastertogridmax turn them into the H3 grids.

What a run looks like​

The bundle deploys one job, wireless_coverage_lf_job, whose four tasks run in sequence. The land task stages the data, pipeline refreshes the Lakeflow pipeline, siting ranks the tower sites, and validate checks the outputs:

The wireless_coverage_lf_job run graph in Databricks: the land, pipeline, siting, and validate tasks chained left to right, all on Serverless.

Opening the pipeline task shows the medallion lineage Lakeflow derived from the table-to-table dependencies. On a full San Francisco run, ~817 M classified LiDAR returns (wc_lidar_pts) bin into a few hundred 1 m DSM / DTM / CHM surface tiles. These tiles roll up into the res-10 H3 gold grids:

A full San Francisco wireless_coverage_lf_pipeline run. wc_lidar_pts (817 M records) feeds wc_surface_dsm, wc_surface_dtm, and wc_surface_chm, then wc_dem_clipped and wc_dem_isobands. The gold wc_h3_dem_res10, wc_h3_dsm_res10, and wc_h3_chm_res10 grids follow. Each dataset shows its type, duration, output record count, and expectations.

Table catalog​

All tables land in {catalog}.{schema} (defaults: geospatial_docs.wireless_coverage_lf).

Bronze​

TableDescription
laz_inventoryAuto Loader streaming table — one row per staged .laz EPT file (path, file_size, _ingested_at).

Silver​

TableDescription
wc_lidar_ptsStreaming table — classified LiDAR returns read with read_paths from the .laz files on the laz_inventory stream (each update reads only the newly inventoried tiles), tile-indexed with a res-15 H3 cell ID (EPSG:3857), plus _source_path (the file each return came from).
wc_surface_dsmDSM — max elevation of all returns per 1 m tile.
wc_surface_dtmDTM — Delaunay-TIN bare earth over class-2 ground returns (gap-free).
wc_surface_chmCHM — rst_chm(DSM, DTM): canopy/structure height in metres, clamped ≥ 0.

Gold​

TableDescription
wc_h3_dem_res10Bare-earth elevation-band H3 cells (res 10), land-masked, with res-9 parent join key.
wc_h3_dsm_res10Surface elevation-band H3 cells (res 10), land-masked, with res-9 parent join key.
wc_h3_chm_res10Max canopy/structure height per H3 cell (res 10), gap-filled, land-masked, with res-9 parent join key.

Siting​

The siting tables are regular Delta tables, overwritten each run. H3-indexed tables (*_res*) carry both a BIGINT cellid column and a STRING h3 column (for map tools that query string H3 keys). They are liquid-clustered on the BIGINT cell column for fast spatial queries. Coverage outputs are H3-indexed at resolution 12 and carry the res-9 parent join key.

TableDescription
wc_h3_surf_r13H3 res-13 surface bin (DSM max elevation per cell) — finest-resolution blocker surface. Columns: cellid BIGINT, h3 STRING, z DOUBLE; liquid-clustered on cellid.
wc_h3_grnd_r13H3 res-13 ground bin (DTM min elevation per cell) — finest-resolution bare-earth base. Columns: cellid BIGINT, h3 STRING, z DOUBLE; liquid-clustered on cellid.
wc_h3_quickpass_res9Every res-9 candidate's coarse quick-pass coverage fraction (pre-rule-out screen).
wc_h3_candidate_sites_res9Ranked tower survivors: cellid BIGINT, h3 STRING, lon, lat, required_mast, viewshed_cells, viewshed_pct, observer_z; liquid-clustered on cellid.
wc_h3_coverage_res12Per-cell line-of-sight depth at res 12 — how many sited towers can see each cell. Columns: cellid BIGINT, h3 STRING, tower_los_count LONG, res INT, parent_cellid, parent_cellid_res; liquid-clustered on cellid. Suitable for external H3 map layers.
wc_h3_coverage_top10_res12Same, aggregated over only the top-10 sites by coverage. Columns: cellid BIGINT, h3 STRING, tower_los_count LONG, res INT, parent_cellid, parent_cellid_res; liquid-clustered on cellid.
wc_h3_site_viewshed_res12Per-site fine-resolution viewshed: one row per sited tower + visible cell pair. Columns: site_cellid BIGINT, site_h3 STRING, cellid BIGINT, h3 STRING, res INT, parent_cellid, parent_cellid_res; liquid-clustered on (site_cellid, cellid) for per-site lookups and per-cell map tiles.

Deploy and run​

databricks bundle deploy
databricks bundle run wireless_coverage_lf_job

The bundle validates and deploys with the committed defaults in databricks.yml out of the box. To point it at your own workspace, copy databricks.override.yml.example to databricks.override.yml (git-ignored) and fill in your CLI profile; it is layered in automatically via include: ["*.override.yml"]. A fresh clone with no override file still validates/deploys.

  • Schedule: the job ships paused (pause_status: PAUSED, daily at 0 0 7 * * ? America/Chicago) — unpause it in the workspace once you've confirmed a manual run.
  • Shared LiDAR: if you have already run the notebook series and staged the USGS 3DEP data, set laz_dir (and optionally water_mask_dir) in your override file. This reuses those files and skips the ~4.9 GB download (about 24,000 LAZ tiles for the full city). See databricks.override.yml.example for the exact paths.
  • GeoBrix wheel: gbx_wheel points at a staged geobrix-0.6.0+env6-py3-none-any.whl. Stage your own build at that path or override the variable to wherever your wheel lives. The notebooks install the wheel from the v0.6.0 release; the bundle installs it from a Volume. Stage it with the steps on the installation page.

Configuration​

Catalog and schema names with hyphens

Unity Catalog catalog and schema names can include hyphens (e.g. solutions-catalog-default, sdsc-nyc-workshop-2026). Both the notebook series and the Lakeflow bundle properly quote all identifiers with backticks, so hyphenated names work without issue. If you encounter errors like "invalid identifier," check that your catalog/schema parameters are spelled correctly (case-sensitive).

Bundle variables (set in databricks.yml; override per-workspace in databricks.override.yml):

VariableDefaultDescription
cataloggeospatial_docsUnity Catalog catalog name.
schemawireless_coverage_lfUC schema; all pipeline and siting tables land here.
volumedataUC volume; raw data lands under {volume}/wireless-coverage-lf/.
full_aoitruetrue for the full San Francisco AOI; false for the Golden Gate Park demo window. After changing it on a deployed pipeline, run databricks bundle run wireless_coverage_lf_pipeline --full-refresh wc_lidar_pts, so the tiles already read are clipped to the new AOI.
simplifytrueApply product st_simplify to isobands before H3 covering (default True = fast, no coverage loss, needed for full-SF performance; False = exact isobands, heavy/slow).
laz_dir(derived)Path to staged .laz EPT files. Leave empty to auto-derive under the Volume. Set to the notebook series' Volume path to reuse already-staged LiDAR. laz_inventory and the streaming table wc_lidar_pts keep the files and points of an earlier folder, so after changing laz_dir on a deployed pipeline reset both once: databricks bundle run wireless_coverage_lf_pipeline --full-refresh laz_inventory,wc_lidar_pts.
water_mask_dir(derived)Path to staged Overture water GeoParquet. Leave empty to auto-derive.
gbx_wheel/Volumes/geospatial_docs/geobrix/sample-data/geobrix-0.6.0+env6-py3-none-any.whlPath to the staged GeoBrix wheel.

Algorithm and resolution parameters are tunable via wireless_coverage.* keys in the pipeline configuration block. Key defaults:

KeyDefaultDescription
h3_res10H3 resolution for the gold elevation/canopy grids.
tower_res9H3 resolution for the naive candidate-tower lattice.
quickpass_res10Coarse quick-pass screen resolution.
viewshed_res12Exact H3 line-of-sight resolution (coverage output).
surface_bin_res13Finest H3 "pixel" bin resolution for siting surfaces.
max_dist_m2500Line-of-sight buffer radius in metres.
antenna_above_surface_m10Observer height above the DSM surface in metres.
quick_thresh_frac0.30Minimum quick-pass coverage fraction to survive rule-out.
simplifytrueSimplify isoband geometry via product st_simplify before H3 covering (default True; set False for exact isobands at the cost of heavy performance at full scale).

Prerequisites​

  • Unity Catalog: a catalog and schema (defaults geospatial_docs.wireless_coverage_lf) and a Volume named data under it. The pipeline creates sub-directories inside the Volume, not the Volume itself.
  • GeoBrix wheel staged at the gbx_wheel path. See Surfaces & Levels.
  • Network access: the land task fetches USGS 3DEP and Overture Maps data over HTTPS — Serverless has outbound internet by default.

Validation notebook​

The validate task (validate/validate_wc_lf.ipynb) runs after the siting task completes, reads all output tables, confirms each is non-empty, and prints summary statistics. It also compares the source files in wc_lidar_pts with the files laz_inventory lists. It prints how many have no points (a file with no point inside the AOI counts too). This check matters because read_paths(..., on_error="skip") skips an unreadable file with only a warning in the executor logs. wc_lidar_pts is a streaming table, so a file skipped once stays without points on later updates. Reset both tables (see the note at the top of this tab) to read it again. Run it manually from the workspace as a quick sanity check after a fresh deploy or configuration change.