Travel Mapping

User Discussions => Other Discussion => Topic started by: SSOWorld on December 01, 2016, 10:25:22 am

Title: Inline commenting on *.list files
Post by: SSOWorld on December 01, 2016, 10:25:22 am
I know this is a feature not many would use but does the parser handle inline commenting?

ex:
Code: [Select]
IL I-90 WI/IL I-294  #NW Tollway
Just putting my $.02 out there.
Title: Re: Inline commenting on *.list files
Post by: Jim on December 01, 2016, 11:43:29 am
I know this is a feature not many would use but does the parser handle inline commenting?

ex:
Code: [Select]
IL I-90 WI/IL I-294  #NW Tollway
Just putting my $.02 out there.

Not at this time.  Any line that doesn't split into 4 space-separated fields generates an "Incorrect format line" message in your log file and is otherwise ignored.  However, full-line comments are supported.  Any line in a .list that begins with # is silently ignored.
Title: Re: Inline commenting on *.list files
Post by: SSOWorld on December 01, 2016, 11:50:00 am
Understood. 

I won't stress over this one.  Would be a nice enhancement, but the full-line does the job. 8)
Title: Re: Inline commenting on *.list files
Post by: Jim on December 01, 2016, 12:46:26 pm
Understood. 

I won't stress over this one.  Would be a nice enhancement, but the full-line does the job. 8)

OK, good.  It would be trivial to add to the code, and my only reason not to do so is that I hesitate to add another operation to the processing of the 180,000 lines of list file entries.  Some time, I'll see how much longer that would take.  It might not be bad, especially if I stripped out comments as a preprocessing step.
Title: Re: Inline commenting on *.list files
Post by: rschen7754 on December 03, 2016, 01:10:03 am
I would appreciate it too, so that I don't second-guess myself if I don't remember why a line is there.  :)
Title: Re: Inline commenting on *.list files
Post by: michih on December 03, 2016, 02:47:24 am
I've submitted an issue on GitHub so that the wish won't get lost: https://github.com/TravelMapping/DataProcessing/issues/37.
Title: Re: Inline commenting on *.list files
Post by: yakra on December 03, 2016, 03:04:53 pm
I would appreciate it too, so that I don't second-guess myself if I don't remember why a line is there.  :)
Just as easily done with full-line comments though. May not be in a preferred, inline, format, but still...
Title: Re: Inline commenting on *.list files
Post by: mapcat on December 03, 2016, 03:14:04 pm
I would appreciate it too, so that I don't second-guess myself if I don't remember why a line is there.  :)
Just as easily done with full-line comments though. May not be in a preferred, inline, format, but still...
Not if you maintain your .list as a spreadsheet and want to be able to sort the data.
Title: Re: Inline commenting on *.list files
Post by: yakra on December 03, 2016, 04:28:00 pm
Not if you maintain your .list as a spreadsheet and want to be able to sort the data.
Ooh. Valid point!
Title: Re: Inline commenting on *.list files
Post by: Jim on July 08, 2018, 11:05:05 pm
I thought of a simple and efficient way to support this, so it's in.

Valid comments are now full-line ones (whole line starts with '#') or lines with 4 fields followed by a space followed by one or more additional fields, the first of which (and 5th on the line) must start with '#'.