status photos

The goal of stac_airphoto_bc is to serve georeferenced historical aerial photograph thumbnails for British Columbia as a STAC collection. Currently covering the Neexdzii Kwa (Upper Bulkley River) watershed with 9,741 photos spanning 1963–2019. Queryable by location and time via rstac and QGIS (v3.42+) at https://images.a11s.one.


This work is built on the fly R package which handles airphoto footprint estimation, spatial filtering, thumbnail downloading, and georeferencing. Sister repos serving other collections on the same endpoint include stac_dem_bc (lidar DEMs) and stac_uav_bc (UAV imagery).



Pipeline

Source centroids from the BC Data Catalogue, process through five stages:

Step Script What
Fetch 01_fetch.R Query centroids, download thumbnails (6 parallel workers via fly)
Georef 02_georef.R Warp thumbnails to estimated ground footprints (BC Albers, EPSG:3005)
COG 03_cog.R + 03_cog_tag.py Convert to Cloud-Optimized GeoTIFFs, embed GDAL metadata tags
S3 04_s3_upload.R Sync COGs + item JSONs to s3://stac-airphoto-bc
STAC 05_stac_register.py Generate STAC items + collection, validate with pystac

Run end-to-end: bash scripts/run_pipeline.sh

Each COG carries embedded metadata (visible in QGIS layer properties): AIRP_ID, PHOTO_DATE, SCALE, FILM_ROLL, FRAME_NUMBER, FOCAL_LENGTH, FLYING_HEIGHT, FILENAME.


Query with rstac

library(rstac)
library(sf)

# Neexdzii Kwa watershed as AOI
aoi <- fresh::frs_watershed_at_measure(
  blue_line_key = 360873822,
  downstream_route_measure = 166030.4
) |> sf::st_transform(4326)

# Search for photos between 1965 and 1975
q <- rstac::stac("https://images.a11s.one/") |>
  rstac::stac_search(
    collections = "stac-airphoto-bc",
    intersects = jsonlite::fromJSON(
      geojsonsf::sf_geojson(aoi, atomise = TRUE, simplify = FALSE),
      simplifyVector = FALSE
    ) |> (\(x) x$geometry)(),
    datetime = "1965-01-01T00:00:00Z/1975-12-31T00:00:00Z"
  ) |>
  rstac::post_request()

r <- q |> rstac::items_fetch()

saveRDS(r, "data/stac_result.rds")
r <- readRDS("data/stac_result.rds")

tab <- tibble::tibble(
  title = purrr::map_chr(r$features, ~ purrr::pluck(.x, "properties", "title", .default = .x$id)),
  url = purrr::map_chr(r$features, ~ purrr::pluck(.x, "assets", "thumbnail", "href"))
) |>
  dplyr::mutate(
    link_view = ngr::ngr_str_link_url(
      url_base = "https://viewer.a11s.one/?cog=",
      url_resource = url,
      url_resource_path = FALSE,
      anchor_text = title
    ),
    link_download = ngr::ngr_str_link_url(
      url_base = url,
      anchor_text = basename(url)
    )
  ) |>
  dplyr::select(link_view, link_download)


QGIS Integration

As of QGIS 3.42, STAC items can be accessed directly via the Data Source Manager. Connect to https://images.a11s.one and browse the stac-airphoto-bc collection. See this blog for details.

Items display with descriptive titles (airp_id -- roll_frame -- date) for easy identification:

Browsing the airphoto collection in QGIS STAC Data Source Manager

Browsing the airphoto collection in QGIS STAC Data Source Manager