osrm-backend/src/extractor
Michael Bell 972a848094
Lazily generate optional route path data (#6045)
Currently route results are annotated with additional path information,
such as geometries, turn-by-turn steps and other metadata.

These annotations are generated if they are not requested or returned
in the response.
Datasets needed to generate these annotations are loaded and available
to the OSRM process even when unused.

This commit is a first step towards making the loading of these datasets
optional. We refactor the code so that route annotations are only
generated if explicitly requested and needed in the response.

Specifically, we change the following annotations to be lazily generated:
- Turn-by-turn steps
- Route Overview geometry
- Route segment metadata

For example. a /route/v1 request with
steps=false&overview=false&annotations=false
would no longer call the following data facade methods:
- GetOSMNodeIDOfNode
- GetTurnInstructionForEdgeID
- GetNameIndex
- GetNameForID
- GetRefForID
- GetTurnInstructionForEdgeID
- GetClassData
- IsLeftHandDriving
- GetTravelMode
- IsSegregated
- PreTurnBearing
- PostTurnBearing
- HasLaneData
- GetLaneData
- GetEntryClass

Requests that include segment metadata and/or overview geometry
but not turn-by-turn instructions will also benefit from this,
although there is some interdependency with the step instructions
- a call to GetTurnInstructionForEdgeID is still required.
Requests for OSM annotations will understandably still need to
call GetOSMNodeIDOfNode.

Making these changes unlocks the optional loading of data contained in
the following OSRM files:
- osrm.names
- osrm.icd
- osrm.nbg_nodes (partial)
- osrm.ebg_nodes (partial)
- osrm.edges
2022-08-22 12:59:20 +01:00
..
intersection Fix distance calculation consistency. (#6315) 2022-08-19 22:31:40 +01:00
compressed_edge_container.cpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
edge_based_graph_factory.cpp Lazily generate optional route path data (#6045) 2022-08-22 12:59:20 +01:00
extraction_containers.cpp Fix distance calculation consistency. (#6315) 2022-08-19 22:31:40 +01:00
extractor_callbacks.cpp Fix for_each_indexed util function 2021-12-22 23:40:06 +00:00
extractor.cpp Enable even more clang-tidy checks (#6273) 2022-07-04 21:46:59 +01:00
graph_compressor.cpp Add support for multiple via-way restrictions (#5907) 2020-12-20 13:59:57 -08:00
location_dependent_data.cpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
maneuver_override_relation_parser.cpp Replace Travis with Github Actions for CI builds 2021-09-03 18:35:01 +02:00
node_based_graph_factory.cpp Add support for multiple via-way restrictions (#5907) 2020-12-20 13:59:57 -08:00
raster_source.cpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
restriction_compressor.cpp Add support for multiple via-way restrictions (#5907) 2020-12-20 13:59:57 -08:00
restriction_filter.cpp Add support for multiple via-way restrictions (#5907) 2020-12-20 13:59:57 -08:00
restriction_graph.cpp Fix for_each_indexed util function 2021-12-22 23:40:06 +00:00
restriction_parser.cpp Complete support for no_entry and no_exit turn restrictions (#5988) 2022-08-22 12:58:16 +01:00
scripting_environment_lua.cpp Complete support for no_entry and no_exit turn restrictions (#5988) 2022-08-22 12:58:16 +01:00
suffix_table.cpp Implements Zero-Copy String Views onto Contiguous Memory, resolves #3265. 2017-01-23 15:22:39 +01:00
way_restriction_map.cpp Add support for multiple via-way restrictions (#5907) 2020-12-20 13:59:57 -08:00