Before you start
A TMH-14 traffic file is a sequence of typed records. A record identifier can depend on its position in the header or traffic section. If a parser reports an unknown or context-invalid record, inspect the surrounding records before changing the identifier or deleting the line.
This guide uses COTO TMH-14, Committee Draft, Format Version 3.20, issued 4 April 2018. Confirm the receiving authority’s adopted requirements and choose the matching check template before preparing a project delivery.
Keep the original sequence
Retain the raw text file and its original line order. Do not sort the file as though every line were an ordinary observation row. Header records provide interpretation context for later records. Moving them can change how an otherwise familiar identifier is understood.
The H0 record starts a header block and H9 ends it. The validator interprets header and traffic records using their respective field definitions. That means a damaged, missing or displaced boundary record can make the next error appear far from its underlying cause. Read upward from the reported location until the relevant boundary is clear.
Check the identifier in context
Type 20 describes speed-summary settings inside a header and carries speed-summary data after H9. Those records have different field definitions. The shared identifier alone is therefore insufficient to decide what fields should follow it.
Record the physical line number, the identifier, the parser's context and the previous boundary marker in your investigation note. Compare the selected template with the intended delivery. A template for a single record type and a template for a mixed file serve different purposes. Do not switch templates solely to suppress a finding.
Preserve delimiters and character rules
TMH-14 checking reads comma-separated records and recognises quoted commas. Its data-quality checks also look for characters outside the permitted printable ASCII representation, while handling record line endings separately. This differs from the semicolon and UTF-8 convention used in the cited TMH-18 exchange specification.
If a file has passed through a spreadsheet or word processor, inspect quotation marks, non-breaking spaces and changed delimiters. Re-export from the original traffic system when possible. Do not replace commas with semicolons merely because another road-data format uses them. The filename and the selected template must agree with the actual record structure.
Inspect count-dependent fields
Some TMH-14 record definitions use declared counts or header information to interpret the fields that follow. A missing value can therefore cause more than one downstream problem. Compare the declared structure with the actual record and the applicable source specification.
Keep truncated records in the exception evidence. Padding them with zeroes or copying a previous record's values would invent traffic data. If a record is genuinely incomplete, determine whether the producer can reconstruct it and record how the receiving authority wants the exception handled.
Reprocess the corrected copy
Correct the export source where possible, retain the original and document the specific change. Run the relevant structural and data-quality checks again on the saved file. Compare record counts and inspect the next records as well as the line that originally failed.
Successful parsing means the parser recognised the record representation and context. Review the structural and data-quality findings separately; parsing alone does not establish that every field or declared count is valid. It does not validate the underlying traffic measurement, monitoring design or instrument calibration. Keep those review responsibilities separate when preparing the handover.
Worked example: a declared speed-bin count
This synthetic example isolates the Type 20 speed-summary description inside a TMH-14 header. It uses Committee Draft Format Version 3.20, section 8.10 (printed pages 50–51). The six displayed fields are the record identifier, summary interval, classification scheme, speed-bin code, number of speed bins and the boundary between the bins. A declaration of n bins needs n−1 boundaries, so the total is n+4 fields.
The fictional logger configuration specifies a 60-minute interval, classification scheme 01, speed-bin code 1 and two bins separated at 80 km/h. The deliberately faulty export declares three bins but supplies only one boundary. It has six fields; the declared three bins require seven. This is an inconsistent declaration, not evidence of a missing vehicle observation.
20,60,01,1,3,8020,60,01,1,2,80Expected result and the limit of the correction
The downloadable record fragments were exercised with the TMH-14.HDR-20 record template and the application’s structural validator. The invalid fragment produces the count-dependent finding TMH14§9-11/DQ-08. The corrected fragment has one record and zero structural errors in that test. The fixture check is reproducible; it is not a result from a real traffic station.
The correction changes the declared count from 3 to 2 because the synthetic source configuration establishes two bins. On an actual project, do not make that edit merely to remove an error: obtain the logger configuration and determine whether the count is wrong or a boundary is missing. Preserve the original export and the source evidence.
These .rsv downloads are single header-record fragments for a record-level template, not complete traffic files. A full RSV needs its required header and traffic context. Type 20 after H9 is a traffic summary with a different layout. Successful parsing, a matching field count and zero structural errors do not establish complete TMH-14 conformity, correct measured counts or equipment calibration.
Sources and scope
- COTO TMH-14: South African Standard Traffic Data Collection FormatCommittee Draft, Format Version 3.20, issue 4 April 2018. §§2.2–2.5: file naming, structure, comma-delimited records and field types.
- COTO TMH-14: header data recordsCommittee Draft, Format Version 3.20, issue 4 April 2018. Chapter 8, printed pages 41–57; §8.10 for header Type 20.
- COTO TMH-14: summary traffic data recordsCommittee Draft, Format Version 3.20, issue 4 April 2018. Chapter 11, printed pages 75–86; §11.2 for traffic summary Type 20.
The cited sources describe their own requirements. Practical checklists and examples do not replace the receiving authority’s adopted profile. Platform review and certification are described in the product documentation.
Working templates
These working aids and synthetic examples are not official templates or evidence of complete compliance. Check each file’s stated scope before use.