Travel Mapping

Highway Data Discussion => Updates to Highway Data => Solved Highway data updates => Topic started by: yakra on October 12, 2018, 02:21:27 am

Title: rusr.csv
Post by: yakra on October 12, 2018, 02:21:27 am
Why the quotation marks in the city field?
Are these necessary?
Title: Re: rusr.csv
Post by: si404 on October 12, 2018, 02:58:53 pm
Because they are route names that always accompany the route number on documents, newspaper articles, etc and come in quotation marks. I could do «name» as they do, but we're using English characters, and thus quotation marks.

Looking, I've used ' rather than " on the rusm system (I think because you complained about that with a reason beyond conformity to US concepts). The move from double to single can be done.
Title: Re: rusr.csv
Post by: michih on October 12, 2018, 03:17:22 pm
But you've renamed the quotation marks for many other countries 2 years ago: https://github.com/TravelMapping/HighwayData/commit/0bbb11e2fc6fca1fc8f080192e43c0acdead37ab
I couldn't care less having them or not but I think we should be consistent. :)

Edit: rusr is now the only system with quotation marks.
Title: Re: rusr.csv
Post by: yakra on October 13, 2018, 01:39:24 am
Edit: rusr is now the only system with quotation marks.
Correct. :) Found that out after a bit of digging; there's gotta be some reason I'd come across something so obscure...
They were fouling up my CHM-style JavaScript maps, by prematurely ending the string containing the City data. The rest of the City datum, following the ", thus became rubbish code that doesn't do anything, crashing the JavaScript. Nothing happen!
In any case, I wrote a workaround (https://github.com/yakra/tmtools/commit/0a1335a84fd685d5e98315a72087b262d3031e72), adding the \ escape character before quotes before writing City to the output file.

As far as extraneous city field data in general go, yes, I'm not a fan. But I acknowledge that may not be a battle I'm likely to win... May as well save my energy?
Title: Re: rusr.csv
Post by: si404 on October 13, 2018, 06:38:50 am
They'll be fixed in my next pull request.
Edit: rusr is now the only system with quotation marks.
Excellent, that means I only missed this one last time and won't miss one next time.