Orphan + Abandoned Wells Flag
Status: Partially shipped (abandoned status visible; orphan flag pending data join) Issue: #153Bundle: Energy Bundle
What's already shipped
The existing AER Wells layer already distinguishes four status classes in its legend (app/config/mapLayers/index.js data-catalog aerWells entry):
| Legend label | AER licence_status values | Colour |
|---|---|---|
| Active | issued, amended, re-entered | #1b9e77 |
| Suspended | suspension | #d95f02 |
| Abandoned | abandoned | #7570b3 |
| Reclaimed | reccertified, recexempt | #e7298a |
The Abandoned filter is therefore already in front of customers. What's missing is the Orphan distinction — wells whose licensee has gone insolvent or otherwise can no longer fulfill closure obligations, transferred to the Orphan Well Association (OWA) inventory.
Orphan and abandoned are not the same thing in AER usage:
- Abandoned is a regulatory state — the well has been physically plugged and the licence is no longer active. The licensee is still on the hook for site reclamation.
- Orphan is a financial-responsibility state — there is no solvent licensee. The OWA manages the closure on behalf of the industry.
A well can be both (an abandoned orphan), an abandoned non-orphan (most abandonments), or an orphan that is not yet abandoned (the OWA has it but hasn't plugged it).
What this issue adds
Two new pieces of information surfaced against existing wells:
- Orphan flag — boolean derived from joining AER UWI against the monthly OWA inventory. Adds an
is_orphancolumn toapp.aer_wells(or a join table). - Legend split — extend the catalog entry to add an "Orphan" legend bucket distinct from Abandoned, with a different colour. Wells flagged orphan render in this new bucket regardless of their
licence_status(so an orphan well with statussuspensionwould render as orphan, not suspended).
Data source — Orphan Well Association
OWA publishes the orphan inventory monthly as a public CSV/XLSX (well-by-well, keyed by UWI). The same data is mirrored at gis.energy.gov.ab.ca for some categories. Pipeline:
- Cron job ingests the monthly OWA CSV into
app.owa_orphan_inventory - Join task updates
is_orphanonapp.aer_wells(or maintains a separateapp.wells_orphan_statustable) - PMTiles regeneration for
aer_wells.pmtilesincludes the new flag in tile properties - Catalog legend in
app/config/mapLayers/index.jsadds an "Orphan" entry withfilterValues: ["orphan"]against a syntheticdisplay_statusproperty
Acceptance criteria progress
- AER abandoned status already visible (shipped via existing AER Wells layer)
- OWA orphan inventory ingestion pipeline (
server/api/cron/owa-orphan-refresh.js) - Join task updating per-well orphan flag
- PMTiles rebuild to include orphan flag in tile properties
- Catalog legend update adding the Orphan bucket (with distinct colour, separate from Abandoned)
- Customer-facing filter UI: ensure operators can show only orphan wells (useful for closure-obligation prioritization)
- Behind
requireEnergyBundle(event)for any API surface
Why operators care
Closure-obligation prioritization is a real workflow. The AER's well-closure spend target is referenced by DLS. A surface-rights holder evaluating cleanup priorities — or an inheritor of an operator's closure obligations through an M&A transaction — needs to know which abandoned wells are on the OWA's books (someone else's problem to fund) vs. which abandoned wells they still own the closure cost on.
Related layers
- AER Wells — base layer this extends
- Crown Dispositions — surface dispositions associated with wells
- Asset/operator history snapshot (#151) — uses the same join to surface operator-level orphan exposure