-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not generate intermediate .osrm file in osrm-extract. #6354
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c8abeb0
Deprecate .osrm file
SiarheiFedartsou 237d794
Deprecate .osrm file
SiarheiFedartsou af8059f
Deprecate .osrm file
SiarheiFedartsou 5fab7ba
Deprecate .osrm file
SiarheiFedartsou 8e6d018
Deprecate .osrm file
SiarheiFedartsou 1648b9c
Deprecate .osrm file
SiarheiFedartsou e17fa9d
Deprecate .osrm file
SiarheiFedartsou 09ca325
Deprecate .osrm file
SiarheiFedartsou 156e5a9
Deprecate .osrm file
SiarheiFedartsou 13245be
Deprecate .osrm file
SiarheiFedartsou 1b940a6
Deprecate .osrm file
SiarheiFedartsou 1bb75f8
Do not generate intermediate .osrm file in osrm-extract.
SiarheiFedartsou 500ea83
Merge branch 'master' into sf-osrm-file
SiarheiFedartsou a96cb23
Do not generate intermediate .osrm file in osrm-extract.
SiarheiFedartsou c3be71a
Do not generate intermediate .osrm file in osrm-extract.
SiarheiFedartsou bbfff7d
Do not generate intermediate .osrm file in osrm-extract.
SiarheiFedartsou fd8ccde
Do not generate intermediate .osrm file in osrm-extract.
SiarheiFedartsou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,14 +60,25 @@ class Extractor | |
Extractor(ExtractorConfig extractor_config) : config(std::move(extractor_config)) {} | ||
int run(ScriptingEnvironment &scripting_environment); | ||
|
||
private: | ||
struct ParsedOSMData | ||
{ | ||
LaneDescriptionMap turn_lane_map; | ||
std::vector<TurnRestriction> turn_restrictions; | ||
std::vector<UnresolvedManeuverOverride> unresolved_maneuver_overrides; | ||
TrafficSignals traffic_signals; | ||
std::unordered_set<NodeID> barriers; | ||
std::vector<util::Coordinate> osm_coordinates; | ||
extractor::PackedOSMIDs osm_node_ids; | ||
std::vector<NodeBasedEdge> edge_list; | ||
std::vector<NodeBasedEdgeAnnotation> annotation_data; | ||
}; | ||
|
||
private: | ||
ExtractorConfig config; | ||
|
||
std::tuple<LaneDescriptionMap, | ||
std::vector<TurnRestriction>, | ||
std::vector<UnresolvedManeuverOverride>, | ||
TrafficSignals> | ||
ParseOSMData(ScriptingEnvironment &scripting_environment, const unsigned number_of_threads); | ||
ParsedOSMData ParseOSMData(ScriptingEnvironment &scripting_environment, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO this |
||
const unsigned number_of_threads); | ||
|
||
EdgeID BuildEdgeExpandedGraph( | ||
// input data | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,15 +34,19 @@ namespace extractor | |
class NodeBasedGraphFactory | ||
{ | ||
public: | ||
// The node-based graph factory loads the *.osrm file and transforms the data within into the | ||
// The node-based graph factory transforms the graph data into the | ||
// node-based graph to represent the OSM network. This includes geometry compression, annotation | ||
// data optimisation and many other aspects. After this step, the edge-based graph factory can | ||
// turn the graph into the routing graph to be used with the navigation algorithms. | ||
NodeBasedGraphFactory(const boost::filesystem::path &input_file, | ||
ScriptingEnvironment &scripting_environment, | ||
NodeBasedGraphFactory(ScriptingEnvironment &scripting_environment, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Above comment will need updating. |
||
std::vector<TurnRestriction> &turn_restrictions, | ||
std::vector<UnresolvedManeuverOverride> &maneuver_overrides, | ||
const TrafficSignals &traffic_signals); | ||
const TrafficSignals &traffic_signals, | ||
std::unordered_set<NodeID> &&barriers, | ||
std::vector<util::Coordinate> &&coordinates, | ||
extractor::PackedOSMIDs &&osm_node_ids, | ||
const std::vector<NodeBasedEdge> &edge_list, | ||
std::vector<NodeBasedEdgeAnnotation> &&annotation_data); | ||
|
||
auto const &GetGraph() const { return compressed_output_graph; } | ||
auto const &GetBarriers() const { return barriers; } | ||
|
@@ -60,9 +64,8 @@ class NodeBasedGraphFactory | |
void ReleaseOsmNodes(); | ||
|
||
private: | ||
// Get the information from the *.osrm file (direct product of the extractor callback/extraction | ||
// containers) and prepare the graph creation process | ||
void LoadDataFromFile(const boost::filesystem::path &input_file); | ||
// Build and validate compressed output graph | ||
void BuildCompressedOutputGraph(const std::vector<NodeBasedEdge> &edge_list); | ||
|
||
// Compress the node-based graph into a compact representation of itself. This removes storing a | ||
// single edge for every part of the geometry and might also combine meta-data for multiple | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjjbell I noticed that all our files match
.osrm.*
pattern, so IMO it feels as a good idea to still use.osrm
extension everywhere, but consider it as "base" path, but not separate file. WDYT?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, agreed.