{
  "name": "RoadRestriction",
  "description": "One road restriction, including closures: road name, regulated section as a point, line or area, status and category. At least one of restrictionStatus, statusLabel is not null. Type https://datamodels.jp/ns/transportation/RoadRestriction; @context https://datamodels.jp/context/transportation/v1.jsonld.",
  "strict": true,
  "schema": {
    "type": "object",
    "properties": {
      "roadName": {
        "type": [
          "string",
          "null"
        ],
        "description": "Road name"
      },
      "roadType": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "expressway",
          "nationalRoad",
          "prefecturalRoad",
          "municipalRoad",
          "other",
          null
        ],
        "description": "Road class by the Road Act (道路法第3条): expressway (高速自動車国道), nationalRoad (一般国道), prefecturalRoad (都道府県道), municipalRoad (市町村道), or other for a road outside the Act (農道, 林道, private road). A motorway designation (自動車専用道路) is not a class of its own: give the class of the road it is on"
      },
      "address": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "addressCountry": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "JP",
              null
            ],
            "description": "Country. Always JP"
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{3}-?\\d{4}$",
            "description": "Postal code, 7 digits with or without hyphen"
          },
          "addressRegion": {
            "type": [
              "string",
              "null"
            ],
            "description": "Prefecture name"
          },
          "addressLocality": {
            "type": [
              "string",
              "null"
            ],
            "description": "Municipality name. For designated cities includes the ward (e.g. 横浜市中区)"
          },
          "machiaza": {
            "type": [
              "string",
              "null"
            ],
            "description": "Town or district name (町字: 町名, 大字, 字), without chome"
          },
          "chome": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d+$",
            "description": "Chome (丁目), digits only (\"一丁目\" → \"1\")"
          },
          "banchi": {
            "type": [
              "string",
              "null"
            ],
            "description": "Banchi (番地): in a residential-indication area the block number (街区符号); elsewhere the whole lot number (地番), branch number included, for example 4638-1"
          },
          "go": {
            "type": [
              "string",
              "null"
            ],
            "description": "Go (号): in a residential-indication area the residence number (住居番号). Empty for a lot number (地番): its branch number stays in banchi"
          },
          "buildingName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Building name, room number and anything below go"
          },
          "residentialIndication": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "true in a residential-indication area (banchi/go are block and residence numbers), false for lot numbers (地番)"
          },
          "jisPrefectureCode": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{2}$",
            "description": "Prefecture code (JIS X 0401, 2 digits)"
          },
          "jisMunicipalityCode": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{5}$",
            "description": "Municipality code (JIS X 0402, 5 digits including the prefecture code)"
          },
          "localGovernmentCode": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{6}$",
            "description": "Local government code (全国地方公共団体コード: JIS X 0402 plus a check digit, 6 digits)"
          },
          "abrMachiazaId": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{7}$",
            "description": "Address Base Registry town id (町字ID, 7 digits). Unique together with localGovernmentCode"
          },
          "addressText": {
            "type": [
              "string",
              "null"
            ],
            "description": "Full address as one normalised line. Also the fallback when structured fields are unavailable"
          }
        },
        "required": [
          "addressCountry",
          "postalCode",
          "addressRegion",
          "addressLocality",
          "machiaza",
          "chome",
          "banchi",
          "go",
          "buildingName",
          "residentialIndication",
          "jisPrefectureCode",
          "jisMunicipalityCode",
          "localGovernmentCode",
          "abrMachiazaId",
          "addressText"
        ],
        "additionalProperties": false,
        "description": "Address of the location, as a JapaneseAddress value (common subject)"
      },
      "location": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Point"
                ]
              },
              "coordinates": {
                "type": "array",
                "items": {
                  "type": "number"
                },
                "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
              }
            },
            "required": [
              "type",
              "coordinates"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "LineString"
                ]
              },
              "coordinates": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  },
                  "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
                },
                "description": "At least 2 positions"
              }
            },
            "required": [
              "type",
              "coordinates"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Polygon"
                ]
              },
              "coordinates": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    },
                    "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
                  },
                  "description": "A closed ring: at least 4 positions, the last equal to the first"
                },
                "description": "The outer ring, then any holes"
              }
            },
            "required": [
              "type",
              "coordinates"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "MultiPoint"
                ]
              },
              "coordinates": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  },
                  "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
                },
                "description": "Positions"
              }
            },
            "required": [
              "type",
              "coordinates"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "MultiLineString"
                ]
              },
              "coordinates": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    },
                    "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
                  },
                  "description": "At least 2 positions"
                },
                "description": "Lines"
              }
            },
            "required": [
              "type",
              "coordinates"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "MultiPolygon"
                ]
              },
              "coordinates": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "number"
                      },
                      "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
                    },
                    "description": "A closed ring: at least 4 positions, the last equal to the first"
                  },
                  "description": "The outer ring, then any holes"
                },
                "description": "Polygons"
              }
            },
            "required": [
              "type",
              "coordinates"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "GeometryCollection"
                ]
              },
              "geometries": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "Point"
                          ]
                        },
                        "coordinates": {
                          "type": "array",
                          "items": {
                            "type": "number"
                          },
                          "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
                        }
                      },
                      "required": [
                        "type",
                        "coordinates"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "LineString"
                          ]
                        },
                        "coordinates": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            },
                            "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
                          },
                          "description": "At least 2 positions"
                        }
                      },
                      "required": [
                        "type",
                        "coordinates"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "Polygon"
                          ]
                        },
                        "coordinates": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "number"
                              },
                              "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
                            },
                            "description": "A closed ring: at least 4 positions, the last equal to the first"
                          },
                          "description": "The outer ring, then any holes"
                        }
                      },
                      "required": [
                        "type",
                        "coordinates"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "MultiPoint"
                          ]
                        },
                        "coordinates": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            },
                            "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
                          },
                          "description": "Positions"
                        }
                      },
                      "required": [
                        "type",
                        "coordinates"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "MultiLineString"
                          ]
                        },
                        "coordinates": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "number"
                              },
                              "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
                            },
                            "description": "At least 2 positions"
                          },
                          "description": "Lines"
                        }
                      },
                      "required": [
                        "type",
                        "coordinates"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "MultiPolygon"
                          ]
                        },
                        "coordinates": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "number"
                                },
                                "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
                              },
                              "description": "A closed ring: at least 4 positions, the last equal to the first"
                            },
                            "description": "The outer ring, then any holes"
                          },
                          "description": "Polygons"
                        }
                      },
                      "required": [
                        "type",
                        "coordinates"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "description": "The geometries"
              }
            },
            "required": [
              "type",
              "geometries"
            ],
            "additionalProperties": false
          }
        ],
        "description": "The regulated section, as a GeoJSON geometry. A point for a single-spot restriction, a LineString for a section, a polygon for an area, matching the point/line/area regulation forms (点規制・線規制・面規制) of the NPA's traffic regulation data format (交通規制情報（拡張版標準フォーマット）説明書 Ver: k_2.1, JARTIC, 2025-01-20) A GeoJSON geometry (Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection)."
      },
      "restrictionLength": {
        "type": [
          "number",
          "null"
        ],
        "description": "Length of the regulated section in metres, for a line. The NPA format (距離・延長, item 133) and EEI (距離・延長) carry it; the geometry alone may be simplified (minimum 0)"
      },
      "maximumAllowedWeight": {
        "type": [
          "number",
          "null"
        ],
        "description": "Weight limit in kilograms: vehicles heavier than this may not pass (for example 4000 when the source limit is 4 t). The same term as Smart Data Models RoadSegment; the NPA format gives it in tonnes (制限重量, item 135). Whether it is gross weight or payload follows the source; keep its wording in statusLabel (minimum 0)"
      },
      "restrictionStatus": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "closed",
          "limited",
          "open",
          null
        ],
        "description": "Normalised restriction state, the value space of Smart Data Models RoadSegment.status: closed (no traffic), limited (traffic possible but not in full capacity), open (restriction lifted or not yet in place). The local wording goes in statusLabel; regulationCategory gives the finer public-sector category. When no value fits, leave it out and give the local wording in statusLabel"
      },
      "regulationCategory": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "closedWeather",
          "closedConstruction",
          "closedHeavyVehicle",
          "closedWinter",
          "laneRestriction",
          "alternatingOneWay",
          "mobileRestriction",
          "chainRestriction",
          "chainGuidance",
          "other",
          null
        ],
        "description": "Regulation category, from the legend of MLIT's Road Information Provision System (道路情報提供システム 通行規制情報, road-info-prvs.mlit.go.jp, accessed 2026-09-24): the categories a road administrator uses for a driver-facing closure or restriction. closedWeather (通行止(異常気象等)) also covers closures after a disaster, such as a landslide or a collapsed road shoulder. Optional and independent of restrictionStatus"
      },
      "statusLabel": {
        "type": [
          "string",
          "null"
        ],
        "description": "The restriction status in the local or source system's wording (依頼中, 通行止め中, 解除済み). Required when restrictionStatus is left out (not empty)"
      },
      "validFrom": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "description": "When the restriction takes effect"
      },
      "validTo": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "description": "When the restriction is lifted"
      },
      "description": {
        "type": [
          "string",
          "null"
        ],
        "description": "Free-text memo"
      }
    },
    "required": [
      "roadName",
      "roadType",
      "address",
      "location",
      "restrictionLength",
      "maximumAllowedWeight",
      "restrictionStatus",
      "regulationCategory",
      "statusLabel",
      "validFrom",
      "validTo",
      "description"
    ],
    "additionalProperties": false
  }
}
