{
  "id": "gb_os_grid_reference",
  "kind": "datatype",
  "status": "draft",
  "name": "Ordnance Survey National Grid reference",
  "doc": "Location on the Ordnance Survey National Grid of Great Britain written with the two letters of a 100 km square (SD, TQ) and an even number of digits, half eastings and half northings: 4 digits give a 1 km square, 10 digits a 1 m point. The digits are often split by spaces (SD 97624 17311). The Irish Grid of Northern Ireland uses one letter instead.",
  "is_pii": false,
  "categories": [
    "geo"
  ],
  "country": [
    "GB"
  ],
  "langs": [
    "en"
  ],
  "classification": "identifier",
  "regexp": "^[HJNOST][A-HJ-Z] ?(?:\\d{2}|\\d{4}|\\d{6}|\\d{8}|\\d{10}|\\d \\d|\\d{2} \\d{2}|\\d{3} \\d{3}|\\d{4} \\d{4}|\\d{5} \\d{5})$",
  "examples": [
    {
      "value": "SD 97624 17311",
      "description": "Scheduled monument in Calderdale, 10 digits",
      "valid": true
    },
    {
      "value": "TQ 873 846",
      "description": "Shellfish sampling point, 6 digits",
      "valid": true
    },
    {
      "value": "SE1735221689",
      "description": "Without spaces",
      "valid": true
    },
    {
      "value": "TL97441340",
      "description": "8 digits",
      "valid": true
    },
    {
      "value": "SD 9762 173",
      "description": "Odd number of digits",
      "valid": false
    },
    {
      "value": "XY 123 456",
      "description": "No such 100 km square",
      "valid": false
    },
    {
      "value": "TQ",
      "description": "No digits",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "wikipedia",
      "url": "https://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid"
    }
  ],
  "detected_by": {
    "tools": [
      "metacrafter"
    ],
    "metacrafter_rules": [
      {
        "rule": "gbosgridreferencefieldvalue",
        "type": "data",
        "match": "regex",
        "file": "gb/gb_geo.yaml"
      },
      {
        "rule": "gbosgridreferencevalue",
        "type": "data",
        "match": "regex",
        "file": "gb/gb_geo.yaml"
      }
    ]
  },
  "quality": {
    "score": 85,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)",
      "translation"
    ]
  },
  "source": {
    "path": "data/datatypes/GB/geo/gb_os_grid_reference.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/GB/geo/gb_os_grid_reference.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/GB/geo/gb_os_grid_reference.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/gb_os_grid_reference",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/gb_os_grid_reference.json"
  }
}