{
  "$id": "bridge.schema.json",
  "$schema": "https://json-schema.org/draft/2024-07/schema",
  "title": "Bridges",
  "description": "Bridge record definition",
  "type": "array",
  "items": {
    "properties": {
      "BL01": {
        "description": "State Code",
        "type": "integer",
        "minimum": 1,
        "maximum": 99
      },
      "BID01": {
        "description": "Bridge Number",
        "type": "string",
        "maxLength": 15
      },
      "BID02": {
        "description": "Bridge Name",
        "type": "string",
        "maxLength": 15
      },
      "BID03": {
        "description": "Previous Bridge Number",
        "type": "string",
        "maxLength": 120
      },
      "BL02": {
        "description": "County Code",
        "type": "integer",
        "minimum": 1,
        "maximum": 999
      },
      "BL03": {
        "description": "Place Code",
        "type": "string",
        "maxLength": 5
      },
      "BL04": {
        "description": "Highway Agency District",
        "type": "string",
        "maxLength": 2
      },
      "BL05": {
        "description": "Latitude",
        "type": "number",
        "minimum": -99.999999,
        "maximum": 99.999999
      },
      "BL06": {
        "description": "Longitude",
        "type": "number",
        "minimum": -999.999999,
        "maximum": 999.999999
      },
      "BL07": {
        "description": "Border Bridge Number",
        "type": "string",
        "maxLength": 15
      },
      "BL08": {
        "description": "Border Bridge State or Country Code",
        "type": "string",
        "maxLength": 2
      },
      "BL09": {
        "description": "Border Bridge Inspection Responsibility",
        "type": "string",
        "maxLength": 1
      },
      "BL10": {
        "description": "Border Bridge Designated Lead State",
        "type": "string",
        "maxLength": 2
      },
      "BL11": {
        "description": "Bridge Location",
        "type": "string",
        "maxLength": 300
      },
      "BL12": {
        "description": "Metropolitan Planning Organization",
        "type": "string",
        "maxLength": 300
      },
      "BCL01": {
        "description": "Owner",
        "type": "string",
        "maxLength": 4
      },
      "BCL02": {
        "description": "Maintenance Responsibility",
        "type": "string",
        "maxLength": 4
      },
      "BCL03": {
        "description": "Federal or Tribal Land Access",
        "type": "string",
        "maxLength": 30
      },
      "BCL04": {
        "description": "Historical Significance",
        "type": "string",
        "maxLength": 1
      },
      "BCL05": {
        "description": "Toll",
        "type": "string",
        "maxLength": 1
      },
      "BCL06": {
        "description": "Emergency Evacuation Designation",
        "type": "string",
        "maxLength": 1
      },
      "BRH01": {
        "description": "Bridge Railings",
        "type": "string",
        "maxLength": 4
      },
      "BRH02": {
        "description": "Transitions",
        "type": "string",
        "maxLength": 4
      },
      "BG01": {
        "description": "NBIS Bridge Length",
        "type": "number",
        "minimum": 0,
        "maximum": 999999.9
      },
      "BG02": {
        "description": "Total Bridge Length",
        "type": "number",
        "minimum": 0,
        "maximum": 999999.9
      },
      "BG03": {
        "description": "Maximum Span Length",
        "type": "number",
        "minimum": 0,
        "maximum": 9999.9
      },
      "BG04": {
        "description": "Minimum Span Length",
        "type": "number",
        "minimum": 0,
        "maximum": 9999.9
      },
      "BG05": {
        "description": "Bridge Width Out-to-Out",
        "type": "number",
        "minimum": 0,
        "maximum": 999.9
      },
      "BG06": {
        "description": "Bridge Width Curb-to-Curb",
        "type": "number",
        "minimum": 0,
        "maximum": 999.9
      },
      "BG07": {
        "description": "Left Curb or Sidewalk Width",
        "type": "number",
        "minimum": 0,
        "maximum": 99.9
      },
      "BG08": {
        "description": "Right Curb or Sidewalk Width",
        "type": "number",
        "minimum": 0,
        "maximum": 99.9
      },
      "BG09": {
        "description": "Approach Roadway Width",
        "type": "number",
        "minimum": 0,
        "maximum": 999.9
      },
      "BG10": {
        "description": "Bridge Median",
        "type": "string",
        "maxLength": 1
      },
      "BG11": {
        "description": "Skew",
        "type": "integer",
        "minimum": 0,
        "maximum": 99
      },
      "BG12": {
        "description": "Curved Bridge",
        "type": "string",
        "maxLength": 2
      },
      "BG13": {
        "description": "Maximum Bridge Height",
        "type": "integer",
        "minimum": 0,
        "maximum": 9999
      },
      "BG14": {
        "description": "Sidehill Bridge",
        "type": "string",
        "maxLength": 1
      },
      "BG15": {
        "description": "Irregular Deck Area",
        "type": "number",
        "minimum": 0,
        "maximum": 999999999.9
      },
      "BG16": {
        "description": "Calculated Deck Area",
        "type": "number",
        "minimum": 0,
        "maximum": 999999999.9
      },
      "BLR01": {
        "description": "Designed Load",
        "type": "string",
        "maxLength": 8
      },
      "BLR02": {
        "description": "Designed Method",
        "type": "string",
        "maxLength": 4
      },
      "BLR03": {
        "description": "Load Rating Date",
        "type": "string",
        "pattern": "^[0-9]{8}$"
      },
      "BLR04": {
        "description": "Load Rating Method",
        "type": "string",
        "maxLength": 4
      },
      "BLR05": {
        "description": "Inventory Load Rating Factor",
        "type": "number",
        "minimum": 0,
        "maximum": 99.99
      },
      "BLR06": {
        "description": "Operating Load Rating Factor",
        "type": "number",
        "minimum": 0,
        "maximum": 99.99
      },
      "BLR07": {
        "description": "Controlling Legal Load Rating Factor",
        "type": "number",
        "minimum": 0,
        "maximum": 99.99
      },
      "BLR08": {
        "description": "Routine Permit Loads",
        "type": "string",
        "maxLength": 1
      },
      "BIR01": {
        "description": "NSTM Inspection Required",
        "type": "string",
        "maxLength": 1
      },
      "BIR02": {
        "description": "Fatigue Details",
        "type": "string",
        "maxLength": 1
      },
      "BIR03": {
        "description": "Underwater Inspection Required",
        "type": "string",
        "maxLength": 1
      },
      "BIR04": {
        "description": "Complex Feature",
        "type": "string",
        "maxLength": 1
      },
      "BC01": {
        "description": "Deck Condition Rating",
        "type": "string",
        "maxLength": 1
      },
      "BC02": {
        "description": "Superstructure Condition Rating",
        "type": "string",
        "maxLength": 1
      },
      "BC03": {
        "description": "Substructure Condition Rating",
        "type": "string",
        "maxLength": 1
      },
      "BC04": {
        "description": "Culvert Condition Rating",
        "type": "string",
        "maxLength": 1
      },
      "BC05": {
        "description": "Bridge Railings Condition Rating",
        "type": "string",
        "maxLength": 1
      },
      "BC06": {
        "description": "Bridge Railings Transitions Condition Rating",
        "type": "string",
        "maxLength": 1
      },
      "BC07": {
        "description": "Bridge Bearings Condition Rating",
        "type": "string",
        "maxLength": 1
      },
      "BC08": {
        "description": "Bridge Joints Condition Rating",
        "type": "string",
        "maxLength": 1
      },
      "BC09": {
        "description": "Channel Condition Rating",
        "type": "string",
        "maxLength": 1
      },
      "BC10": {
        "description": "Channel Protection Condition Rating",
        "type": "string",
        "maxLength": 1
      },
      "BC11": {
        "description": "Scour Condition Rating",
        "type": "string",
        "maxLength": 4
      },
      "BC12": {
        "description": "Bridge Condition Classification",
        "type": "string",
        "maxLength": 1
      },
      "BC13": {
        "description": "Lowest Condition Rating Code",
        "type": "string",
        "maxLength": 1
      },
      "BC14": {
        "description": "NSTM Inspection Condition",
        "type": "string",
        "maxLength": 1
      },
      "BC15": {
        "description": "Underwater Inspection Condition",
        "type": "string",
        "maxLength": 1
      },
      "BAP01": {
        "description": "Approach Roadway Alignment",
        "type": "string",
        "maxLength": 1
      },
      "BAP02": {
        "description": "Overtopping Likelihood",
        "type": "string",
        "maxLength": 5
      },
      "BAP03": {
        "description": "Scour Vulnerability",
        "type": "string",
        "maxLength": 5
      },
      "BAP04": {
        "description": "Scour Plan of Action",
        "type": "string",
        "maxLength": 3
      },
      "BAP05": {
        "description": "Seismic Vulnerability",
        "type": "string",
        "maxLength": 1
      },
      "BW01": {
        "description": "Year Built",
        "type": "integer",
        "minimum": 0,
        "maximum": 9999
      },
      "Elements": {
        "type": "array",
        "items": {
          "properties": {
            "BE01": {
              "description": "Element Number",
              "type": "string",
              "maxLength": 4
            },
            "BE02": {
              "description": "Element Parent Number",
              "type": "string",
              "maxLength": 4
            },
            "BE03": {
              "description": "Element Total Quantity",
              "type": "integer",
              "minimum": 0,
              "maximum": 99999999
            },
            "BCS01": {
              "description": "Element Quantity Condition State One",
              "type": "integer",
              "minimum": 0,
              "maximum": 99999999
            },
            "BCS02": {
              "description": "Element Quantity Condition State Two",
              "type": "integer",
              "minimum": 0,
              "maximum": 99999999
            },
            "BCS03": {
              "description": "Element Quantity Condition State Three",
              "type": "integer",
              "minimum": 0,
              "maximum": 99999999
            },
            "BCS04": {
              "description": "Element Quantity Condition State Four",
              "type": "integer",
              "minimum": 0,
              "maximum": 99999999
            }
          },
          "required": [
            "BE01",
            "BE02"
          ],
          "additionalProperties": false
        }
      },
      "Features": {
        "type": "array",
        "items": {
          "properties": {
            "BF01": {
              "description": "Feature Type",
              "type": "string",
              "maxLength": 3
            },
            "BF02": {
              "description": "Feature Location",
              "type": "string",
              "maxLength": 1
            },
            "BF03": {
              "description": "Feature Name",
              "type": "string",
              "maxLength": 300
            },
            "BH01": {
              "description": "Functional Classification",
              "type": "string",
              "maxLength": 3
            },
            "BH02": {
              "description": "Urban Code",
              "type": "string",
              "maxLength": 5
            },
            "BH03": {
              "description": "NHS Designation",
              "type": "string",
              "maxLength": 1
            },
            "BH04": {
              "description": "National Highway Freight Network",
              "type": "string",
              "maxLength": 3
            },
            "BH05": {
              "description": "STRAHNET Designation",
              "type": "string",
              "maxLength": 1
            },
            "BH06": {
              "description": "LRS Route ID",
              "type": "string",
              "maxLength": 120
            },
            "BH07": {
              "description": "LRS Mile Point",
              "type": "number",
              "minimum": 0,
              "maximum": 99999.999
            },
            "BH08": {
              "description": "Lanes On Highway",
              "type": "integer",
              "minimum": 0,
              "maximum": 99
            },
            "BH09": {
              "description": "Annual Average Daily Traffic",
              "type": "integer",
              "minimum": 0,
              "maximum": 99999999
            },
            "BH10": {
              "description": "Annual Average Daily Truck Traffic",
              "type": "integer",
              "minimum": 0,
              "maximum": 99999999
            },
            "BH11": {
              "description": "Year of Annual Average Daily Traffic",
              "type": "integer",
              "minimum": 0,
              "maximum": 9999
            },
            "BH12": {
              "description": "Highway Maximum Usable Vertical Clearance",
              "type": "number",
              "minimum": 0,
              "maximum": 99.9
            },
            "BH13": {
              "description": "Highway Minimum Vertical Clearance",
              "type": "number",
              "minimum": 0,
              "maximum": 99.9
            },
            "BH14": {
              "description": "Highway Minimum Horizontal Clearance, Left",
              "type": "number",
              "minimum": 0,
              "maximum": 99.9
            },
            "BH15": {
              "description": "Highway Minimum Horizontal Clearance, Right",
              "type": "number",
              "minimum": 0,
              "maximum": 99.9
            },
            "BH16": {
              "description": "Highway Maximum Usable Surface Width",
              "type": "number",
              "minimum": 0,
              "maximum": 99.9
            },
            "BH17": {
              "description": "Bypass Detour Length",
              "type": "integer",
              "minimum": 0,
              "maximum": 999
            },
            "BH18": {
              "description": "Crossing Bridge Number",
              "type": "string",
              "maxLength": 15
            },
            "BRR01": {
              "description": "Railroad Service Type",
              "type": "string",
              "maxLength": 2
            },
            "BRR02": {
              "description": "Railroad Minimum Vertical Clearance",
              "type": "number",
              "minimum": 0,
              "maximum": 99.9
            },
            "BRR03": {
              "description": "Railroad Minimum Horizontal Offset",
              "type": "number",
              "minimum": 0,
              "maximum": 99.9
            },
            "BN01": {
              "description": "Navigable Waterway",
              "type": "string",
              "maxLength": 1
            },
            "BN02": {
              "description": "Navigable Minimum Vertical Clearance",
              "type": "number",
              "minimum": 0,
              "maximum": 999.9
            },
            "BN03": {
              "description": "Movable Bridge Maximum Navigation Vertical Clearance",
              "type": "number",
              "minimum": 0,
              "maximum": 999.9
            },
            "BN04": {
              "description": "Navigation Channel Width",
              "type": "number",
              "minimum": 0,
              "maximum": 9999.9
            },
            "BN05": {
              "description": "Navigation Channel Minimum Horizontal Clearance",
              "type": "number",
              "minimum": 0,
              "maximum": 9999.9
            },
            "BN06": {
              "description": "Substructure Navigation Protection",
              "type": "string",
              "maxLength": 3
            },
            "Routes": {
              "type": "array",
              "items": {
                "properties": {
                  "BRT01": {
                    "description": "Route Designation",
                    "type": "string",
                    "maxLength": 3
                  },
                  "BRT02": {
                    "description": "Route Number",
                    "type": "string",
                    "maxLength": 15
                  },
                  "BRT03": {
                    "description": "Route Direction",
                    "type": "string",
                    "maxLength": 3
                  },
                  "BRT04": {
                    "description": "Route Type",
                    "type": "string",
                    "maxLength": 1
                  },
                  "BRT05": {
                    "description": "Service Type",
                    "type": "string",
                    "maxLength": 1
                  }
                },
                "required": [
                  "BRT01"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "BF01"
          ],
          "additionalProperties": false
        }
      },
      "Inspections": {
        "type": "array",
        "items": {
          "properties": {
            "BIE01": {
              "description": "Inspection Type",
              "type": "string",
              "maxLength": 1
            },
            "BIE02": {
              "description": "Inspection Begin Date",
              "type": "string",
              "pattern": "^[0-9]{8}$"
            },
            "BIE03": {
              "description": "Inspection Completion Date",
              "type": "string",
              "pattern": "^[0-9]{8}$"
            },
            "BIE04": {
              "description": "Nationally Certified Bridge Inspector",
              "type": "string",
              "maxLength": 15
            },
            "BIE05": {
              "description": "Inspection Interval",
              "type": "integer",
              "minimum": 0,
              "maximum": 99
            },
            "BIE06": {
              "description": "Inspection Due Date",
              "type": "string",
              "pattern": "^[0-9]{8}$"
            },
            "BIE07": {
              "description": "Risk-Based Inspection Interval Method",
              "type": "string",
              "maxLength": 1
            },
            "BIE08": {
              "description": "Inspection Quality Control Date",
              "type": "string",
              "pattern": "^[0-9]{8}$"
            },
            "BIE09": {
              "description": "Inspection Quality Assurance Date",
              "type": "string",
              "pattern": "^[0-9]{8}$"
            },
            "BIE10": {
              "description": "Inspection Data Update Date",
              "type": "string",
              "pattern": "^[0-9]{8}$"
            },
            "BIE11": {
              "description": "Inspection Note",
              "type": "string",
              "maxLength": 300
            },
            "BIE12": {
              "description": "Inspection Equipment",
              "type": "string",
              "maxLength": 120
            }
          },
          "required": [
            "BIE01",
            "BIE02"
          ],
          "additionalProperties": false
        }
      },
      "PostingEvaluations": {
        "type": "array",
        "items": {
          "properties": {
            "BEP01": {
              "description": "Legal Load Configuration",
              "type": "string",
              "maxLength": 15
            },
            "BEP02": {
              "description": "Legal Load Rating Factor",
              "type": "number",
              "minimum": 0,
              "maximum": 99.99
            },
            "BEP03": {
              "description": "Posting Type",
              "type": "string",
              "maxLength": 17
            },
            "BEP04": {
              "description": "Posting Value",
              "type": "string",
              "maxLength": 15
            }
          },
          "required": [
            "BEP01"
          ],
          "additionalProperties": false
        }
      },
      "PostingStatuses": {
        "type": "array",
        "items": {
          "properties": {
            "BPS02": {
              "description": "Posting Status Change Date",
              "type": "string",
              "pattern": "^[0-9]{8}$"
            },
            "BPS01": {
              "description": "Load Posting Status",
              "type": "string",
              "maxLength": 4
            }
          },
          "required": [
            "BPS02",
            "BPS01"
          ],
          "additionalProperties": false
        }
      },
      "SpanSets": {
        "type": "array",
        "items": {
          "properties": {
            "BSP01": {
              "description": "Span Configuration Designation",
              "type": "string",
              "maxLength": 3
            },
            "BSP02": {
              "description": "Number of Spans",
              "type": "integer",
              "minimum": 0,
              "maximum": 9999
            },
            "BSP03": {
              "description": "Number of Beam Lines",
              "type": "integer",
              "minimum": 0,
              "maximum": 999
            },
            "BSP04": {
              "description": "Span Material",
              "type": "string",
              "maxLength": 4
            },
            "BSP05": {
              "description": "Span Continuity",
              "type": "string",
              "maxLength": 3
            },
            "BSP06": {
              "description": "Span Type",
              "type": "string",
              "maxLength": 4
            },
            "BSP07": {
              "description": "Span Protective System",
              "type": "string",
              "maxLength": 3
            },
            "BSP08": {
              "description": "Deck Interaction",
              "type": "string",
              "maxLength": 2
            },
            "BSP09": {
              "description": "Deck Material and Type",
              "type": "string",
              "maxLength": 4
            },
            "BSP10": {
              "description": "Wearing Surface",
              "type": "string",
              "maxLength": 3
            },
            "BSP11": {
              "description": "Deck Protective System",
              "type": "string",
              "maxLength": 4
            },
            "BSP12": {
              "description": "Deck Reinforcing Protective System",
              "type": "string",
              "maxLength": 3
            },
            "BSP13": {
              "description": "Deck Stay-In-Place Forms",
              "type": "string",
              "maxLength": 3
            }
          },
          "required": [
            "BSP01"
          ],
          "additionalProperties": false
        }
      },
      "SubstructureSets": {
        "type": "array",
        "items": {
          "properties": {
            "BSB01": {
              "description": "Substructure Configuration Designation",
              "type": "string",
              "maxLength": 3
            },
            "BSB02": {
              "description": "Number of Substructure Units",
              "type": "integer",
              "minimum": 0,
              "maximum": 999
            },
            "BSB03": {
              "description": "Substructure Material",
              "type": "string",
              "maxLength": 3
            },
            "BSB04": {
              "description": "Substructure Type",
              "type": "string",
              "maxLength": 3
            },
            "BSB05": {
              "description": "Substructure Protective System",
              "type": "string",
              "maxLength": 3
            },
            "BSB06": {
              "description": "Foundation Type",
              "type": "string",
              "maxLength": 3
            },
            "BSB07": {
              "description": "Foundation Protective System",
              "type": "string",
              "maxLength": 3
            }
          },
          "required": [
            "BSB01"
          ],
          "additionalProperties": false
        }
      },
      "Works": {
        "type": "array",
        "items": [
          {
            "type": "object",
            "properties": {
              "BW02": {
                "description": "Year Work Performed",
                "type": "integer",
                "minimum": 0,
                "maximum": 9999
              },
              "BW03": {
                "description": "Work Performed",
                "type": "string",
                "maxLength": 120
              }
            },
            "required": [
              "BW02"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "required": [
      "BL01",
      "BID01"
    ],
    "additionalProperties": false
  }
}
