-
Notifications
You must be signed in to change notification settings - Fork 6
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
failsafe vertex labels to examine shortening #90
Comments
Closed intersections
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Never mind:
Two separate unconnected segments of AR108, one in AR & one in TX, both connecting to US59/71 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
TX21@US183/130&TX130@461&US183@TX21 Pending...
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I-93@12&MA3@12(93)&MA3APly@MA3_N&MA203@I-93&US1@I-93(12) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
TravelMapping#90 (comment) Solo routes compressed OK, but concurrencies were still double-counted.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
i7 & i8i7: use
OK, so this ended up using the C++ string class; it's just more convenient. :P bool Waypoint::label_references_single_route(Route *r)
{ std::string no_abbrev = r->name_no_abbrev();
if (label.substr(0, no_abbrev.size()) != no_abbrev)
return 0;
if (label[no_abbrev.size()] == 0 || label[no_abbrev.size()] == '_')
return 1;
if (label.substr(no_abbrev.size(), r->abbrev.size()) != r->abbrev)
return 0;
if (label[no_abbrev.size() + r->abbrev.size()] == 0 || label[no_abbrev.size() + r->abbrev.size()] == '_') // If I comment out this line along with...
return 1;
else return 0; // ...this one, then the results change.
} if (ap_coloc.size() == 2)
if (ap_coloc[1]->label_references_route(ap_coloc[0]->route) && ap_coloc[0]->label_references_route(ap_coloc[1]->route))
{ std::string newname = ap_coloc[1]->label+"/"+ap_coloc[0]->label;
// if this is taken or if name_no_abbrev()s match, attempt to add in abbrevs if there's point in doing so
bool taken = vertex_names.find(newname) != vertex_names.end();
if ( (ap_coloc[0]->route->abbrev.size() || ap_coloc[1]->route->abbrev.size())
&& (taken || ap_coloc[0]->route->name_no_abbrev() == ap_coloc[1]->route->name_no_abbrev())
) { const char *u0 = strchr(ap_coloc[0]->label.data(), '_');
const char *u1 = strchr(ap_coloc[1]->label.data(), '_');
std::string newname = (ap_coloc[0]->route->list_entry_name() + (u1 ? u1 : "")) + "/" + (ap_coloc[1]->route->list_entry_name() + (u0 ? u0 : ""));
std::string message = "Straightforward intersection: " + name + " -> " + newname;
if (taken) message += " (" + ap_coloc[1]->label+"/"+ap_coloc[0]->label + " already taken)";
log.push_back(message);
return newname;
}
log.push_back("Straightforward intersection: " + name + " -> " + newname);
return newname;
} Commenting out the two lines noted above in the new function changes how we react to an unexpected abbrev, letter suffix, or slashed designation giving us 228 diffs. I'm still in the process of looking through them, and the results are... interesting. I see evidence of cases where somethign went wrong or got forgotten while editing; some potential for future datachecks. In almost all cases, Jim's existing labels (which we get with the two lines of code left in place) are objectively better. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cd ~/TravelMapping/devel
( echo 'latitude;longitude;old label;new label'
paste -d';' \
<(diff <(head -n 588644 i0can.tmg) \
<(head -n 588644 i15can.tmg) | grep '^<' | cut -f3 -d' ') \
<(diff <(head -n 588644 i0can.tmg) \
<(head -n 588644 i15can.tmg) | grep '^<' | cut -f4 -d' ') \
<(diff <(head -n 588644 i0can.tmg) \
<(head -n 588644 i15can.tmg) | grep '^<' | cut -f2 -d' ') \
<(diff <(head -n 588644 i0can.tmg) \
<(head -n 588644 i15can.tmg) | grep '^>' | cut -f2 -d' ') \
) > i15diff.csv • replace 588644 with num vertices + 2 |
This comment has been minimized.
This comment has been minimized.
CT8@39&CT222@US6/8&US6@CT8(39) |
These can be copied to the comments of siteupdate.py.
A9Gun/A9Alt/E49Gun/E49Alt/E51Gun/E51Alt@ST/SN
Added to comments (Straightforward_concurrency)ME9@PondRd&ME137@PondRd_Alb&US202@PondRd
(though this is similar to some examples already listed, that just have directional _suffixes instead)The text was updated successfully, but these errors were encountered: