bods-data-extractor
Version:
Convert BODS UK dataset bus line data from XML to JSON
69 lines • 1.52 kB
TypeScript
export interface StopPoint {
id: string;
name: string;
}
export interface Location {
from: string;
to: string;
longitude: string;
latitude: string;
}
export interface RouteSegment {
id: string | null;
runTime: string;
fromStop: string | null;
toStop: string | null;
}
export interface VehicleJourney {
time: string;
VehicleJourneyCode: string;
privateCode?: string | null;
routeSegments: RouteSegment[];
}
export interface BodsOutput {
stopPoints: StopPoint[];
location: Location[];
outboundJourneys: VehicleJourney[];
inboundJourneys: VehicleJourney[];
}
export interface JourneyPatternTimingLink {
fromStopPointRef: string;
toStopPointRef: string;
}
export interface RawStopPoint {
StopPointRef: {
_text: string;
};
CommonName: {
_text: string;
};
}
export interface RawVehicleJourney {
DepartureTime: {
_text: string;
};
VehicleJourneyCode: {
_text: string;
};
PrivateCode?: {
_text: string;
};
VehicleJourneyTimingLink: any;
}
export interface RawTransXChangeData {
TransXChange: {
StopPoints: {
AnnotatedStopPointRef: RawStopPoint[];
};
JourneyPatternSections: {
JourneyPatternSection: any;
};
RouteSections: {
RouteSection: any;
};
VehicleJourneys: {
VehicleJourney: RawVehicleJourney[];
};
};
}
//# sourceMappingURL=bods.d.ts.map