minotor
Version:
A lightweight client-side transit routing library.
24 lines (23 loc) • 791 B
TypeScript
import { Latitude, Longitude, Platform, SourceStopId, Stop } from '../stops/stops.js';
export type GtfsLocationType = 0 | 1 | 2 | 3 | 4;
export type StopEntry = {
stop_id: SourceStopId;
stop_name: string;
stop_lat?: Latitude;
stop_lon?: Longitude;
location_type?: GtfsLocationType;
parent_station?: SourceStopId;
platform_code?: Platform;
};
type ParsedStop = Stop & {
parentSourceId?: SourceStopId;
};
export type GtfsStopsMap = Map<SourceStopId, ParsedStop>;
/**
* Parses the stops.txt file from a GTFS feed.
*
* @param stopsStream The readable stream containing the stops data.
* @return A mapping of stop IDs to corresponding stop details.
*/
export declare const parseStops: (stopsStream: NodeJS.ReadableStream) => Promise<GtfsStopsMap>;
export {};