Repository navigation
Open
Labels
Description
Waypoint simplification for 3+_intersection cases has trouble at beltway ends.
- N264_W/R23/R23 could just as easily be N264_E/R23/R23.
N264/R23 would be even better. - AH1/AH31/G1113/G1501/G1501/G15_W could just as easily be AH1/AH31/G1113/G1501/G1501/G15_E.
AH1/AH31/G1113/G1501/G15 would be even better.
Find these cases by adding a continue to a refactored 3+_intersection routine:
if len(self.ap_coloc) > 2:
suffixes = [""] * len(self.ap_coloc)
for check in self.ap_coloc:
match = False
for index, other in enumerate(self.ap_coloc):
if other == check:
continue
other_no_abbrev = other.route.name_no_abbrev()
if check.label.startswith(other_no_abbrev):
# should check here for false matches, like
# NY50/67 would match startswith NY5
match = True
if len(suffixes[index]): ### REMOVE THESE TWO ###
continue ### LINES FOR DIFFS ###
try:
suffix = check.label[check.label.index('_'):]
# we confirmed above that other_no_abbrev matches, so skip past it
# we need only match the suffix with or without the abbrev
if check.label[len(other_no_abbrev):] == suffix \
or other.route.abbrev + suffix == check.label[len(other_no_abbrev):]:
suffixes[index] = suffix
except ValueError:
pass
if not match:
break
if match:
label = self.ap_coloc[0].route.list_entry_name() + suffixes[0]
for index in range(1,len(self.ap_coloc)):
label += "/" + self.ap_coloc[index].route.list_entry_name() + suffixes[index]
log.append("3+_intersection: " + name + " -> " + label)
return labelThere's something more at play in the diffs than just beltway ends...
- 740 points changed in waypointsimplification.log
- 315 DUPLICATE_COORDS cases (36 datacheck.log entries + 279 matched FPs)
- What are the other 425 changes?
Activity
yakra commentedon Feb 28, 2021
only related in that they're 3+_intersection:
yakra commentedon Feb 28, 2021
Due to a wrong-way multiplex, this point is
LA1174_Non LA29 andLA1174_Son LA95.Don't know if this accounts for all 425 changes, but I'm not about to examine them all in detail. I'll see what changes once I start messing with the code.
yakra commentedon Mar 2, 2021
See also #260
yakra commentedon Jun 17, 2021
diffs & stats as in the OP
HighwayData @ 8ff82de099da29963190be37677060b775d8c6cc
745 points changed in waypointsimplification.log.
312 unique-location active/preview DUPLICATE_COORDS cases.
Only 80 of these vertex labels appear in DIFFs
In other news:
DataProcessing/siteupdate/cplusplus/classes/Waypoint/canonical_waypoint_name/3plus_intersection.cpp
Lines 25 to 26 in 07fa662
DataProcessing/siteupdate/python-teresco/siteupdate.py
Lines 617 to 618 in 07fa662
Implementing this results in some diffs I don't understand yet...
Edit: Must have been working with a revision of the code other than the one I thought I was working with. Things are behaving closer to expectation now.
Here are the first 4 diffs from implementation:
yakra commentedon Nov 27, 2021
Useful examples:
egrep '.+@(.+)_S&.+@\1_N.* -> .*\1_[NEWS]|.+@(.+)_N&.+@\2_S.* -> .*\2_[NEWS]|.+@(.+)_W&.+@\3_E.* -> .*\3_[NEWS]|.+@(.+)_E&.+@\4_W.* -> .*\4_[NEWS]' waypointsimplification.logyakra commentedon Mar 20, 2024
Back to the OP...
Allow
_N+_Sand_E+_Wto cancel out.Beware: On its own, this will cause collsions:
For the 1st one,
LA1174_N&LA1174_Scancel out, yieldingLA29/LA95/LA1174.This makes the 2nd one a duplicate, causing it to revert to failsafe.
Therefore 3+_intersection: induction variables; suffix efficiency yakra/DataProcessing#261 needs a rethink.
_after a/.We don't want to compare the whole label.
/, e.g. LA95?Prefer labels less likely to disagree, e.g.
_A,_B,_C,_Foo,_Bar, etc._A,_B,_C?