import { type MarkupElement } from "@mailwoman/core/html/elements"; import type { PathBuilderLike } from "path-ts"; /** * The feature element that contains a centreline. */ export declare const OPEN_ROADS_LINK_ELEMENT = "road:RoadLink"; /** * One road link with a name. */ export interface OpenRoadsLink { /** * The link's `gml:id`. */ id: string; /** * `road:name1` as the tile spells it. */ name1: string; /** * The roadNameTOID, without the `#` of the reference, such as `osgb4000000010927776`. */ roadNameTOID: string; /** * The centreline as flat `[easting0, northing0, easting1, northing1, …]` in EPSG:27700 meters. */ vertices: Float64Array; } /** * Counts from a read. */ export interface OpenRoadsReadStats { /** * Road links read. */ links: number; /** * Road links with names that the reader yielded. */ named: number; /** * Links with no `road:name1` or no `road:roadNameTOID`. */ unnamed: number; /** * Road links whose centreline has fewer than two vertices or a non-numeric ordinate. */ malformedGeometry: number; } /** * A stats object with every count at zero. */ export declare function createOpenRoadsReadStats(): OpenRoadsReadStats; /** * Reads a link described by a `road:RoadLink` element or returns the reason it couldn't read one. */ export declare function readOpenRoadsLink(element: MarkupElement): OpenRoadsLink | "unnamed" | "malformed-geometry"; /** * One road link as a network edge: its name or road number, and the nodes it joins. */ export interface OpenRoadsNetworkLink { /** * `road:name1`, or `road:roadClassificationNumber` for a road with no name. */ name: string; /** * `road:name2`, the name in a second language. */ alternateName: string | null; startNode: string; endNode: string; meters: number; /** * The centreline as flat `[easting0, northing0, easting1, northing1, …]` in EPSG:27700 meters. */ vertices: Float64Array; } /** * Reads a link as a network edge, or returns null for a link with no label, node or usable centreline. */ export declare function readOpenRoadsNetworkLink(element: MarkupElement): OpenRoadsNetworkLink | null; /** * Streams every labeled road link in one Open Roads GML tile as a network edge. */ export declare function readOpenRoadsNetwork(gmlPath: PathBuilderLike, stats: OpenRoadsReadStats): AsyncGenerator; /** * Streams links with names from one Open Roads GML tile. */ export declare function readOpenRoadsLinks(gmlPath: PathBuilderLike, stats: OpenRoadsReadStats, options?: { signal?: AbortSignal; }): AsyncGenerator; //# sourceMappingURL=roads.d.ts.map