AGS4 syntax: the five rules that break a delivery
Updated: 2026-08-04 · ISKRIT
Rules 1 to 5 of the AGS Data Format govern the text of a single line. They sound trivial and they generate most rejected files, because the tools people export from do not know about them.
The line contract
Every field on every line is enclosed in double quotes and fields are separated by commas. Nothing else may appear outside the quotes, not a space after the comma, not a tab, not a trailing semicolon. A quote character inside a value is written twice. The first field of every line is a descriptor: GROUP, HEADING, UNIT, TYPE or DATA.
That is the whole contract, and each of its parts is a separate rule, which is why a single malformed line can produce three findings at once.
What actually triggers them
A borehole log that records a depth range as 1.20-1.50 m is
fine. The same log with a remark like sand, 6" cobbles is not,
unless the inch mark was doubled. Text fields copied from a word processor
carry typographic quotes that look identical in a viewer and are a different
character to a parser.
Spreadsheet exports produce the other classic failure: a value containing a comma, a soil description for instance, split across two fields. The line then has more fields than the HEADING line declares, which is a rule 7 count mismatch rather than a syntax fault, and the fix is quoting, not renumbering.
Reading the report
A useful validator reports the line number, the group the line belongs to and the specific defect, not just an invalid line. Characters found outside the quotes tell you a separator landed in the open; an unclosed field quote tells you a value swallowed the rest of the line. Both point at the same underlying mistake in different halves of the file, and the line number is what makes the fix a two-minute edit rather than a re-export.
Fixing without re-exporting
Line-level faults are safe to repair in a text editor, because they do not change any measured value. Quote the unquoted field, double the internal quote, delete the stray character. Group-level faults are not: adding a missing PROJ group by hand means inventing project metadata, and that belongs to whoever produced the data.
The AGS4 checker reports every line fault with its line number and group, so the file can be corrected in place.
ASTM D4253 and D4254: maximum and minimum index density
Relative density Dr and density index Id are not the same number
USCS classification step by step: ASTM D2487
Cu and Cc: what the two gradation coefficients actually tell you
Dual symbols in USCS: the 5 to 12 percent fines band
EN ISO 14688-1 against USCS: two different size ladders
AGS4 file validation: what the rules actually check
ASTM D2435 oedometer test: from the curve to Cc, mv and Eoed
Converting oedometer modulus to Young’s modulus
EN ISO 17892-5 and ASTM D2435: where the two diverge
ASTM D1196 plate load test: modulus and subgrade reaction
DIN 18134: Ev1, Ev2 and the compaction ratio
Ménard pressuremeter modulus: ASTM D4719 and EN ISO 22476-4
Shewhart control chart constants: A2, A3, B3, B4, D3, D4, d2, c4
The eight out of control tests on a Shewhart chart
Repeatability and reproducibility limits: where 2.77 comes from
How rebar cutting plans are optimised: the cutting stock problem
Cutting waste in rebar fabrication: what percentage is normal
Earthwork volume from survey points: grid, TIN and cross sections