AGS4 syntax: the five rules that break a delivery
Updated: September 30, 2026 · 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.
Questions
What do AGS4 rules 1 to 5 require? Every field on every line is enclosed in double quotes, fields are separated by commas with nothing outside the quotes, a quote inside a value is written twice, and the first field is a descriptor: GROUP, HEADING, UNIT, TYPE or DATA.
Why does a value containing a comma break the file? Left unquoted it splits into two fields, so the line has more fields than its HEADING line declares. That is a rule 7 count mismatch, and the fix is quoting the value, not renumbering.
Why do quotes copied from a word processor cause errors? Typographic quotes look identical in a viewer but are a different character to a parser, so the field is not closed where it appears to be.
The AGS4 checker reports every line fault with its line number and group, so the file can be corrected in place.
Measurement uncertainty calculator: GUM budget with Type A, Type B and expanded U
Area from coordinates calculator: shoelace formula for survey plots
Bearing and distance from coordinates: survey inverse calculator
Rotating shift patterns: covering the posts and balancing the hours
Calibration intervals: setting them, shortening them, defending them
Turning an estimate into a bill of quantities that foots
Progress billing: percent complete, carry-forward and retention
Checking claimed quantities: the design schedule and the survey
Pile capacity from CPT: how the LCPC method reads a cone trace
Driven and bored piles: why the same soil gives different capacity
What belongs on a borehole log, and what quietly gets left off
Drawing a cross section: correlating layers between boreholes
From an AGS4 file to a laboratory summary: what the groups carry
Characteristic values: turning a set of test results into one number
Void ratio, porosity and saturation from one density test
When one soil layer is really two: splitting geotechnical units
ASTM D4254 minimum index density: procedure and Dr calculator
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
Hydraulic conductivity from a pumping test: Dupuit calculator and formulas
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
Rebound hammer calibration: why the factory curve is not enough
Kerf and offcut: what a linear cutting plan has to account for
Earthwork volume from survey points: grid, TIN and cross sections
Fire load density: the formula, the calorific values and the traps
Explosive atmosphere zones 0, 1, 2 and 20, 21, 22 explained
Pollution charges per tonne: how the over-limit multiplier works
The Russian environmental fee: who pays, when, and how the advances work