mobileMenu




AGS File Utilities Tool and API


This tool and associated API allow schema validation, data validation and conversion of your AGS files.

  • Accepts multiple AGS files. (Hold down Ctrl key to select more than one file, 50 Mb total maximum upload limit)
  • Tests AGS versions 4.x only
  • Files are not saved or stored by this tool

Tools




AGS Schema & Data Validation


AGS Validation BETA

Performs validation using the Official AGS Python Library BETA version 0.3.6 - FOR TESTING ONLY, NOT FOR PRODUCTION USE, this implements checks of the rules as written in the AGS data format standard v4.x.


BGS aims to update to v1.x of the python library as soon as practicable at which point this will be suitable production use.


BGS Data Validation

Data validation against the National Geoscience Data Repository requirements, see below.

Files with TRIT & SUCT group present may report a "Duplicate sample id" error, this will be fixed shortly. All other BGS checks are working.


Select AGS version, if not specified in TRAN_AGS:

Tool uses AGS version specified in the supplied file, if not present, uses selection here, default is v4.0.4


Select AGS Version

Select checkers


Select response format:

Select .ags file(s) for validation (v4.x only). and submit

BGS Data Validation rules

Your files will be validated against the following rules as defined by BGS/NGDC:

  • Check required Groups
    • Groups shall include PROJ, LOCA or HOLE, ABBR, TYPE, UNIT
  • Check required BGS Groups
    • Groups may include GEOL - required for BGS submission
  • Check Spatial Referencing
    • Spatial referencing system defined in LOCA_GREF, LOCA_LREF or LOCA_LLZ.
    • Example: LOCA_GREF:OSGB, LOCA_LREF:London Grid 1, LOCA_LLZ:WGS84
  • Check Easting/Northing present.
    • LOCA_NATE and LOCA_NATN are populated. Zeros or null do not pass
  • Check Easting/Northing values fall within reasonable range
    • LOCA_NATE values inside 100,000 to 800,000 range
    • LOCA_NATN values inside 100,000 to 1,400,000 range
  • Check Drill Depth (HDPH) present
    • HDPH_TOP does not contain null values
    • HDPH_BASE does not contain zero or null values
  • Check Drill depths (HDPH) have corresponding records in GEOL table
    • Checking HDPH LOCA_IDs are in GEOL group AND GEOL LOCA_IDs are in HDPH group
  • Check locations are onshore Great Britain or Northern Ireland
    • Note: If using Irish grid and GREF not entered, tool cannot differentiate from EPSG:27700 (OSGB)
  • Check for duplication between NATE/NATN, LOCX/LOCY and LON/LAT
    • Duplication presumes error in these columns which should be checked
  • Check LOCA_ID references are valid
    • Checks all groups which have LOCA_ID are populated with a valid record present in the LOCA Group.
  • Check SAMP_ID or LOCA_ID, SAMP_TOP, SAMP_TYPE, SAMP_REF references are valid
    • LOCA_ID, SAMP_TOP, SAMP_TYPE, SAMP_REF are all populated, not null, and unique in combination within SAMP group AND all LOCA_ID values are present in the LOCA group
    • Also all groups that reference the SAMP group as a parent, use either the SAMP_ID field or the combination of LOCA_ID, SAMP_TOP, SAMP_TYPE, SAMP_REF and that the parent exists in the SAMP group.

Future data validation rules: (Coming Soon)

  • LOC_LAT/LONG lie in reasonable range


AGS Converter

Convert .ags file(s) to/from .xlsx.

Which ever format file is submitted, the opposite will be returned e.g. if 5 .ags files and 3 .xlsx files were submitted the result would be 5 .xlsx files and 3 .ags files


Select files


API Definition

Documentation (Swagger UI)

OpenAPI Document

ReDoc



Powered by pyagsapi. pyagsapi was created by and is maintained by the British Geological Survey and is distributed under the LGPL v3.0 licence, code is available on GitHub. pyagsapi uses the Official AGS Python Library.