Skip to content

NewGraphEnvironment/stac_dem_bc

Repository files navigation

stac_dem_bc

status updates api

stac_dem_bc serves British Columbia’s LidarBC digital elevation model collection — nearly 100,000 GeoTIFFs on the provincial objectstore as of July 2026 — as a SpatioTemporal Asset Catalog (STAC), searchable by location and time from the rstac R package, QGIS (v3.42+), or any STAC-compliant client. The API endpoint is https://images.a11s.one.


The catalog refreshes monthly: a scheduled GitHub Actions workflow detects new tiles on the objectstore and appends them incrementally. The build pipeline — and a plain-language guide to the concepts behind it (COG, STAC, pgstac, validation caching) — lives in scripts/.



Query the collection

Use bcdata to define an area of interest, then query the stac-dem-bc collection for DEM tiles intersecting it. Below: all DEMs covering the Bulkley River watershed group between 2018 and 2020.

aoi <- bcdata::bcdc_query_geodata("freshwater-atlas-watershed-groups") |>
  bcdata::filter(WATERSHED_GROUP_NAME == "Bulkley River") |>
  bcdata::collect() |>
  sf::st_transform(crs = 4326)

date_start <- "2018-01-01T00:00:00Z"
date_end <- "2020-12-31T00:00:00Z"

# use rstac to query the collection
q <- rstac::stac("https://images.a11s.one/") |>
  rstac::stac_search(
    collections = "stac-dem-bc",
    intersects = jsonlite::fromJSON(
      geojsonsf::sf_geojson(
        aoi, atomise = TRUE, simplify = FALSE
      ),
      simplifyVector = FALSE
    ) |> (\(x) x$geometry)(),
    datetime = paste0(date_start, "/", date_end)
  ) |>
  rstac::post_request()

# get details of the items
r <- q |>
  rstac::items_fetch()

# burn the results locally so we can serve it instantly on index.html builds
saveRDS(r, "data/stac_result.rds")
r <- readRDS("data/stac_result.rds")
# build the table to display the info
tab <- tibble::tibble(
  url_download = purrr::map_chr(r$features, ~ purrr::pluck(.x, "assets", "image", "href"))
)

Please see http://www.newgraphenvironment.com/stac_dem_bc for the published table of collection links.

QGIS Data Source Manager (v3.42+)

QGIS 3.42 added native STAC support — connect directly to the catalog and filter by the current map view. See Lutra Consulting’s STAC-in-QGIS blog post for a walk-through.

Connecting to https://images.a11s.one

Connecting to https://images.a11s.one

Using the field of view in QGIS to filter results

Using the field of view in QGIS to filter results

Sister collections on the same endpoint

The same images.a11s.one STAC API serves several complementary BC collections:

Roadmap

  • uv-based Python dependency management (#16) — migrate from conda to uv for faster, more reproducible Python environments.
  • Structured logging + performance benchmarking (#6) — instrument the pipeline so build performance is quantifiable across runs.
  • True footprint geometry (#2) — recalculate per-item footprints to exclude no-data pixels rather than using bounding boxes; gives accurate spatial-overlap queries.
  • Validation-failure triage (#11) — STACError on specific item JSONs; underlying root cause + automated retry.

Browse open issues for the full backlog.

License

MIT.

About

STAC catalog of British Columbia's LidarBC DEM collection — search ~100k elevation tiles by location and time via rstac, QGIS, or any STAC client at images.a11s.one. Updated monthly.

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages