Skip to content

Access flight metadata from BC Air Photo Database (focal length, flying height, tilt) #10

@NewGraphEnvironment

Description

@NewGraphEnvironment

Context

The BC Air Photo Database spec (April 2008, CRGB) defines rich per-roll and per-flight-line metadata:

  • Type 02 (Roll): camera focal length code, film emulsion code
  • Type 03 (Line): average flying height (m), requested flying height (m), flight line azimuth
  • Type 04 (Photo): tilt/crab/verticality codes, scale-off code, forward overlap code

However, the centroid layer available from BC Data Catalogue (AIMG_PHOTO_CENTROIDS_SP) only exposes simplified fields: airp_id, photo_year, photo_date, scale, film_roll, frame_number, media, photo_tag, nts_tile.

What IS available programmatically

The centroid layer has two URL columns not currently used by fly:

  • thumbnail_image_url — photo thumbnails at openmaps.gov.bc.ca/thumbs/
  • flight_log_url — flight log PDFs at openmaps.gov.bc.ca/thumbs/logbooks/

The flight log PDFs likely contain camera type, focal length, negative format, flying height, and other metadata from the full database spec. These are grouped by roll, so one PDF covers many photos.

Potential approaches

  1. Parse flight log PDFs — download unique flight_log_url values, extract text (many may be scanned so OCR needed), pull camera/focal length/flying height per roll. Join back to centroids by film_roll.

  2. Request bulk database export — the province may provide the full Air Photo System database (or relevant tables) as a data release or FOI request. This would give machine-readable access to all Type 01-04 fields.

  3. WIMSI web scraping — the Web Imagery Search Interface may expose additional fields per photo not available in the WFS layer.

What this unlocks

  • Accurate negative size — confirm 9x9 or identify non-standard formats per roll (currently hardcoded as default)
  • Flying height per flight line — combined with focal length, gives true scale at terrain rather than reported nominal scale
  • Tilt/crab angles — for future terrain-adjusted footprints (issue DEM-based terrain-adjusted footprints #9)
  • Forward overlap codes — the database already flags substandard overlap, useful for fly_overlap() validation

Reference

Acceptance criteria

  • Investigate flight log PDF structure and parseability
  • Prototype extraction of focal length and flying height from a sample of flight log PDFs
  • Evaluate which approach (PDF parsing vs bulk data request) is viable
  • If viable, create helper to enrich centroid data with flight metadata

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions