Repository navigation
Closed
TravelMapping/DataProcessing
#309Description
jerseyman4.list ASCII text, with CRLF line terminators
1c1
< Log file created at: 2019-01-11 02:56:19.683818
---
> Log file created at: Fri Jan 11 03:44:42 2019
6c6
< Note: deprecated route name I-270_SPUR -> canonical name I-270SprAsh in line MD I-270_SPUR I-495 2
---
> Note: deprecated route name I-270_SPUR -> canonical name I-270SprAsh in line MD I-270_SPUR I-495 2
22c22
< Note: deprecated route name I-840FutWGr -> canonical name I-840 in line NC I-840FutWGr 1 3
---
> Note: deprecated route name I-840FutWGr -> canonical name I-840 in line NC I-840FutWGr 1 3
50c50
< Note: deprecated route name US72_E -> canonical name US72Cha in line TN US72_E AL/TN I-24(152)
---
> Note: deprecated route name US72_E -> canonical name US72Cha in line TN US72_E AL/TN I-24(152) Spaces (?) at end of lines in C++ version
| char * endchar = lines[l+1]-2; // -2 skips over the 0 inserted by strtok | |
| if (*endchar == 0) endchar--; // skip back one more for CRLF cases FIXME what about lines followed by blank lines? | |
| while (*endchar == ' ' || *endchar == '\t') | |
| { *endchar = 0; | |
| endchar--; | |
| } |
endchar is in amongst a sea of \0s, not whitespace; never trimmed.WontFix.
Activity
yakra commentedon Jan 11, 2019
lowenbrau.list data
TravelMapping#41 (comment)
The final line,
ON ON405 ON/USA PorRd, is followed by 1486 null\0s, before a final CRLF.This will require a fix in siteupdate.py.
yakra commentedon Jan 11, 2019
neilbert.list ASCII text, with CRLF line terminators
C++: the
*gets destroyed by strtok, resulting in 4 fields, and a correctly formatted line which we then attempt to parse.As an unprocessed line in both cases, I'm not too hung up on fixing it, but if I want to, some old code (Travelerlist.cpp?) should still be kicking around that doesn't strip
*via strtok.yakra commentedon Jan 11, 2019
ntallyn.list ASCII text, with CRLF line terminators
Incorrect format line: LA LA3152extra space at end in C++ version
*SC SC11 (?) I-85*Python: No
*SCregion, ergoUnknown region/highway comboC++:
*stripped by strtok ->SC SC11 (?) I-85-> Waypoint label(?)not foundNot too fussed about fixing this either; an invalid line is an invalid line. Ideally, this would just be a .list file comment.
yakra commentedon Jan 11, 2019
rebelgtp.list ASCII text, with CRLF line terminators
Space(s) at end of line again.
See first post.
WontFix.
yakra commentedon Jan 11, 2019
spinoza.list ASCII text, with CRLF line terminators
**DEU-BW L173 B500_S AllStr_WPython: No
**DEU-BWregion, ergoUnknown region/highway comboC++:
*stripped by strtok ->DEU-BW L173 B500_S AllStr_W-> Waypoint labelAllStr_Wnot foundNot too fussed about fixing this either (or am I?); an invalid line is an invalid line. Ideally, this would just be a .list file comment.
yakra commentedon Jan 11, 2019
valedc03ls.list ASCII text, with CRLF line terminators
Space(s) at end of line again.
See first post.
WontFix.
yakra commentedon Jan 11, 2019
*as whitespace.)TravelMapping/HighwayData@d3cc92b#diff-920c2aec98c9258fb3e02488d783253a
TravelMapping/UserData@26e0653#diff-3d4c8a05cff360be33292fd05167dbcf
yakra commentedon Apr 28, 2019
oscar
Python and C++ are known to produce different floating-point values in the less significant digits.
Assuming the difference here straddles that magical 7.985 mi value, but looking into this in more detail.
Edit: Grabbed coords from WPTedit, and used LibreOffice to recreate the steps of the
Waypoint::distance_to(Waypoint *other)function. The result for Oscar's mileage on ME103 is 7.98499996119456 mi, so it looks like that's exactly what's happening. A freak of statistics & rounding.Fix:
double rlat1 = lat * pi/180;->double rlat1 = lat * (pi/180);yakra commentedon Apr 9, 2020
Reconsider items flagged "wontfix".
re.splitcan be used to mimic C++'sstrtok, and we can eliminate differences.*as astrtokdelimiter. Sometimes people use these as unofficial comment markers. They should be treated as part of a field, and not a form of whitespace. siteupdate.py does it right.yakra commentedon Apr 15, 2020
A pending fix for TravelMapping#41 will close this.
C++: Spaces at end of lines
Heh. In the same breath, I linked some code with a "FIXME" and flagged with a "WontFix." So which is it?
Fixed the FIXME, the bug where a line was followed by a blank line.
(jerseyman4, ntallyn, rebelgtp, valedc03ls)
Py: null zeros @ EOF
Checking only last line, to not waste CPU time on all the others.
(lowenbrau only)
C++: extraneous *s
Treat as part of a field, not a delimiter
(neilbert, ntallyn, spinoza)