export type Tags = Record; /** [lonDeg, latDeg] */ export type LonLat = [number, number]; export interface RawWay { id: number; /** Node ids, aligned with `pts`. Roads need them to find junctions. */ refs: number[]; pts: LonLat[]; tags: Tags; } export interface RawMember { type: 'way' | 'node' | 'relation'; ref: number; role: string; /** Resolved geometry of a way member. */ pts?: LonLat[]; refs?: number[]; } export interface RawRelation { id: number; tags: Tags; members: RawMember[]; } export interface RawNode { id: number; lon: number; lat: number; tags: Tags; } export interface RawOsm { ways: RawWay[]; relations: RawRelation[]; /** Tagged nodes only: signals, stops, crossings, lamps, trees, shops. */ nodes: RawNode[]; provenance: { source: 'overpass' | 'pbf'; /** Overpass endpoint, or the PBF file name. */ endpoint?: string; query?: string; file?: string; fetchedAt?: string; /** sha256 of the raw response / PBF bytes. */ sha256?: string; /** `osm3s.timestamp_osm_base` or the PBF replication timestamp. */ dataTimestamp?: string; cache?: 'hit' | 'miss'; }; /** Elements the reader itself could not use (missing geometry and the like), by reason. */ readerRefusals: Record; } /** Geographic bounding box. */ export interface Bbox { south: number; west: number; north: number; east: number; } export declare function parseBbox(text: string): Bbox; export declare function bump(counts: Record, key: string, by?: number): void; /** The box grown by `metres` on every side (approximate: 1 degree of latitude = 111.32 km). */ export declare function expandBbox(bbox: Bbox, metres: number): Bbox; /** Coastline is closed against a box this far beyond the city bounds (the format says bounds + 2 km), so its ways are read that far out. */ export declare const COAST_MARGIN_M = 2000; export declare const COAST_READ_MARGIN_M = 2300;