* Processes the collected data and serializes it. * * In this function the nodes will eventually be converted from their 64bit OSM id to the * internal 32bit OSRM id. * * - Identify nodes of ways used in restrictions and maneuver overrides * - Filter nodes list to nodes that are referenced by ways * - Prepare edges and compute routing properties * - Prepare and validate restrictions and ma
| 405 | * |
| 406 | */ |
| 407 | void ExtractionContainers::PrepareData(ScriptingEnvironment &scripting_environment, |
| 408 | const std::string &name_file_name) |
| 409 | { |
| 410 | const auto restriction_ways = IdentifyRestrictionWays(); |
| 411 | const auto maneuver_override_ways = IdentifyManeuverOverrideWays(); |
| 412 | scripting_environment.m_obstacle_map.preProcess(used_node_id_list, way_node_id_offsets); |
| 413 | |
| 414 | ways_list.clear(); |
| 415 | ways_list.shrink_to_fit(); |
| 416 | way_node_id_offsets.clear(); |
| 417 | way_node_id_offsets.shrink_to_fit(); |
| 418 | |
| 419 | PrepareNodes(); |
| 420 | PrepareEdges(scripting_environment); |
| 421 | scripting_environment.m_obstacle_map.fixupNodes(used_node_id_list); |
| 422 | |
| 423 | PrepareManeuverOverrides(maneuver_override_ways); |
| 424 | PrepareRestrictions(restriction_ways); |
| 425 | WriteCharData(name_file_name); |
| 426 | } |
| 427 | |
| 428 | void ExtractionContainers::WriteCharData(const std::string &file_name) |
| 429 | { |
no test coverage detected