ISKRIT / engineering reference ← to reference

AGS4 file validation: what the rules actually check

Updated: 2026-08-04 · ISKRIT

An AGS4 file is rejected for structural reasons far more often than for wrong geotechnical values. Most of those reasons are mechanical and can be found without any reference dictionary, straight from the text of the file.

What is checkable from the file alone

RulesChecks
1 to 5line syntax: every field quoted, comma separated, doubled quotes inside a field, nothing outside the quotes
2b and 7group descriptor order: GROUP, then HEADING, then UNIT and TYPE, then DATA, and every DATA row matching the heading count
8data types: 2DP means exactly two decimal places, YN accepts only Y or N, DT must parse as a date
10key links: every SAMP row pointing at a LOCA that exists
13 and 14PROJ and TRAN present, one DATA row each
15 and 17units and types used in the file declared in the UNIT and TYPE groups
16PA abbreviations present in the ABBR group
19group and heading names in the permitted character set and length

What is not checkable that way

Rule 9 requires every heading to exist in the standard AGS dictionary for its group. Enforcing it needs the dictionary itself embedded in the checker, along with the dictionary version the file targets. A validator without that dictionary should state plainly that rule 9 was not applied rather than pass the file silently. Ours does exactly that.

The type rules bite hardest

Rule 8 is where clean-looking files fail. A TYPE of 2DP is not “a number rounded to two decimals”, it is a requirement that the text in the field carry exactly two decimal places. The value 12.5 under a 2DP heading is a rule 8 error even though the number is right, and so is 12.500. Spreadsheet exports produce this constantly, because a spreadsheet drops trailing zeros and the exporter writes whatever the cell holds.

Questions

Does a rule 8 failure block loading? Most receiving systems load the file and flag the row, but a client checking to the letter of the format can reject the delivery.

Are warnings and errors distinguished? Yes. Missing mandatory groups are errors, an undeclared unit is reported separately from a broken line, and the report keeps line numbers so the file can be fixed directly.

Upload a file and get the rule-by-rule report from the AGS4 validation tool.