File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ SegmentLookupTable readSegmentValues(const std::vector<std::string> &paths)
4444 });
4545 if (found_inconsistency != std::end (result.lookup ))
4646 {
47- throw util::exception ( " empty segment in CSV with node " +
48- std::to_string (found_inconsistency->first .from ) + " " + SOURCE_REF );
47+ util::Log (logWARNING) << " Empty segment in CSV with node " +
48+ std::to_string (found_inconsistency->first .from );
4949 }
5050
5151 return result;
Original file line number Diff line number Diff line change @@ -221,6 +221,12 @@ updateSegmentData(const UpdaterConfig &config,
221221 {
222222 auto u = osm_node_ids[nodes_range[segment_offset]];
223223 auto v = osm_node_ids[nodes_range[segment_offset + 1 ]];
224+
225+ // Self-loops are artifical segments (e.g. traffic light nodes), do not
226+ // waste time updating them with traffic data
227+ if (u == v)
228+ continue ;
229+
224230 if (auto value = segment_speed_lookup ({u, v}))
225231 {
226232 auto segment_length = segment_lengths[segment_offset];
@@ -254,6 +260,12 @@ updateSegmentData(const UpdaterConfig &config,
254260 {
255261 auto u = osm_node_ids[nodes_range[segment_offset]];
256262 auto v = osm_node_ids[nodes_range[segment_offset + 1 ]];
263+
264+ // Self-loops are artifical segments (e.g. traffic light nodes), do not
265+ // waste time updating them with traffic data
266+ if (u == v)
267+ continue ;
268+
257269 if (auto value = segment_speed_lookup ({v, u}))
258270 {
259271 auto segment_length = segment_lengths[segment_offset];
You can’t perform that action at this time.
0 commit comments