API reference¶
Auto-generated from docstrings. These are the stable, load-bearing public functions; internal helpers are omitted on purpose.
The HARD-RULE filter¶
tracelines.models.is_official_panoid(pid)
¶
Positive whitelist for official Google pano ids (Layer-1 HARD-RULE guard).
Stricter and safer than streetlevel's prefix denylist: it positively
confirms the 22-char / 16-byte / terminal-{A,Q,g,w} invariant, which rejects
the documented false-negative classes (legacy 22-char photospheres, the new
CIAB/AF1Q UGC schemes) that a CIHM0og/len>22 denylist would let through.
Verified 2026-07-13 against 628 live official Bucharest ids (100% accept) and
live CIHM photosphere ids (100% reject).
Source code in tracelines/models.py
Data model¶
tracelines.models.Pano
dataclass
¶
A single coverage node (one panorama / image point), provider-agnostic.
Google/KartaView emit these and rely on graph stitching; Mapillary emits native segments directly (see CoverageSegment).
Source code in tracelines/models.py
tracelines.models.CoverageSegment
dataclass
¶
A continuous coverage polyline — one of the "blue lines".
Source code in tracelines/models.py
length_m
property
¶
n_points
property
¶
to_geojson_feature()
¶
Source code in tracelines/models.py
tracelines.models.Source
¶
Extraction¶
tracelines.pipeline.extract(bbox, source_names, settings)
¶
tracelines.nearest.find_nearest_coverage(lat, lon, *, radius_tiles=1, require_connected=True, verify_source=True, include_trekker=False)
¶
Live: nearest official continuous-coverage pano to (lat, lon).
Never returns a third-party pano. Searches the z17 tile containing the point plus a (2*radius_tiles+1)^2 neighborhood so border cases are covered.
Source code in tracelines/nearest.py
tracelines.nearest.nearest_official(cands, lon, lat, require_connected=True)
¶
Pure: apply the HARD RULE and return official candidates, nearest first.
Drops every third-party pano (photosphere/photopet) via BOTH the streetlevel denylist (is_third_party) AND the positive is_official_panoid whitelist. With require_connected, also drops isolated official dots (degree 0).