#pragma once #include #include "trenesis/geojson.h" namespace trenesis { using json = nlohmann::json; struct StopPoint; struct StopArea { std::string id; std::string label; std::string name; Point coord; std::unordered_map> stop_points; StopArea(std::string id, std::string label, std::string name, Point coord); }; struct JourneySection { StopPoint* origin; StopPoint* destination; // TODO: use real types for times std::string departure_time; std::string arrival_time; }; struct StopPoint { std::string id; std::string label; std::string name; Point coord; StopArea* stop_area; std::vector departures; StopPoint( std::string id, std::string label, std::string name, Point coord, StopArea* stop_area ); }; struct Network { std::unordered_map> stop_areas; static Network build_from_json(const json& vehicle_journeys, const json& stop_points); }; }