Model/domain/geospatial/coordinates.py
Khalim Conn-Kowlessar 3998ef586c feat(geospatial): GeospatialRepo — OS Open-UPRN coordinate lookup (#1131)
Add Coordinates value object + GeospatialRepository port + GeospatialS3Repository
adapter. Resolves a Property's lon/lat from the partitioned Ordnance Survey
Open-UPRN parquet (filename_meta -> partition -> UPRN row). A Repo, not a
Fetcher (ADR-0011): no live OS API call. The parquet reader is injected, so it's
unit-tested against fixture parquets with no S3/network; returns None when the
UPRN is uncovered or absent. pyright strict clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 19:55:46 +00:00

15 lines
379 B
Python

from __future__ import annotations
from dataclasses import dataclass
@dataclass(frozen=True)
class Coordinates:
"""A WGS84 point for a Property — longitude/latitude in decimal degrees.
Resolved from the Ordnance Survey Open-UPRN reference data and fed to the
Google Solar fetcher by the Ingestion orchestrator.
"""
longitude: float
latitude: float