{
  "$schema": "https://datapackage.org/profiles/2.0/tableschema.json",
  "title": "ジオコーディングの結果",
  "description": "1 つの住所をジオコーディングした結果です。住所は datamodels.jp の JapaneseAddress、座標は点で表します。そのうえで、入力のどこまでが一致したか（matchLevel）、座標がどの単位のものか（coordinateLevel）、どのジオコーダーとどの版のデータを使ったかを持ちます。一致の単位はジオコーダーごとに書き方が違うので、共通の値に置き換え、元の書き方は matchLevelLabel に残します。",
  "x-type": "GeocodingResult",
  "x-typeIri": "https://models.geolonia.com/ns/geocoding#GeocodingResult",
  "x-version": "0.1.0",
  "x-schema": "https://models.geolonia.com/schema/geocoding/GeocodingResult/v0.1.0.json",
  "x-context": "https://models.geolonia.com/context/geocoding/v0.jsonld",
  "x-translations": {
    "en": {
      "title": "Geocoding result",
      "description": "The result of geocoding one address. The address is datamodels.jp's JapaneseAddress and the coordinates are a point. On top of that it records how much of the input matched (matchLevel), which part of the address the coordinates belong to (coordinateLevel), and which geocoder and which version of the data were used. Every geocoder writes its match levels differently, so they are mapped to shared values, and the geocoder's own wording stays in matchLevelLabel."
    }
  },
  "fields": [
    {
      "name": "id",
      "title": "エンティティの ID",
      "description": "エンティティの ID（URI。例：urn:ngsi-ld:GeocodingResult:001）",
      "type": "string",
      "constraints": {
        "required": true,
        "unique": true
      },
      "x-translations": {
        "en": {
          "title": "Entity id",
          "description": "Entity id: a URI, for example urn:ngsi-ld:GeocodingResult:001"
        }
      }
    },
    {
      "name": "query",
      "title": "ジオコーダーに渡した住所の文字列",
      "description": "ジオコーダーに渡した住所の文字列（そのまま）",
      "type": "string",
      "x-iri": "https://models.geolonia.com/ns/geocoding#query",
      "constraints": {
        "required": true,
        "minLength": 1
      },
      "x-translations": {
        "en": {
          "description": "The address text given to the geocoder, unchanged"
        }
      }
    },
    {
      "name": "address.addressCountry",
      "title": "Country",
      "description": "Country. Always JP。address の一部。",
      "type": "string",
      "x-iri": "https://schema.org/addressCountry",
      "constraints": {
        "enum": [
          "JP"
        ]
      },
      "x-translations": {
        "en": {
          "title": "Country",
          "description": "Country. Always JP. Part of address."
        }
      }
    },
    {
      "name": "address.postalCode",
      "description": "Postal code, 7 digits with or without hyphen。address の一部。",
      "type": "string",
      "x-iri": "https://schema.org/postalCode",
      "constraints": {
        "pattern": "\\d{3}-?\\d{4}"
      },
      "x-translations": {
        "en": {
          "description": "Postal code, 7 digits with or without hyphen. Part of address."
        }
      }
    },
    {
      "name": "address.addressRegion",
      "title": "Prefecture name",
      "description": "Prefecture name。address の一部。",
      "type": "string",
      "x-iri": "https://schema.org/addressRegion",
      "x-translations": {
        "en": {
          "title": "Prefecture name",
          "description": "Prefecture name. Part of address."
        }
      }
    },
    {
      "name": "address.addressLocality",
      "title": "Municipality name",
      "description": "Municipality name. For designated cities includes the ward (e.g. 横浜市中区)。address の一部。",
      "type": "string",
      "x-iri": "https://schema.org/addressLocality",
      "x-translations": {
        "en": {
          "title": "Municipality name",
          "description": "Municipality name. For designated cities includes the ward (e.g. 横浜市中区). Part of address."
        }
      }
    },
    {
      "name": "address.machiaza",
      "title": "Town or district name",
      "description": "Town or district name (町字: 町名, 大字, 字), without chome。address の一部。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/common/machiaza",
      "x-translations": {
        "en": {
          "title": "Town or district name",
          "description": "Town or district name (町字: 町名, 大字, 字), without chome. Part of address."
        }
      }
    },
    {
      "name": "address.chome",
      "title": "Chome",
      "description": "Chome (丁目), digits only (\"一丁目\" → \"1\")。address の一部。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/common/chome",
      "constraints": {
        "pattern": "\\d+"
      },
      "x-translations": {
        "en": {
          "title": "Chome",
          "description": "Chome (丁目), digits only (\"一丁目\" → \"1\"). Part of address."
        }
      }
    },
    {
      "name": "address.banchi",
      "title": "Banchi",
      "description": "Banchi (番地): in a residential-indication area the block number (街区符号); elsewhere the whole lot number (地番), branch number included, for example 4638-1。address の一部。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/common/banchi",
      "x-translations": {
        "en": {
          "title": "Banchi",
          "description": "Banchi (番地): in a residential-indication area the block number (街区符号); elsewhere the whole lot number (地番), branch number included, for example 4638-1. Part of address."
        }
      }
    },
    {
      "name": "address.go",
      "title": "Go",
      "description": "Go (号): in a residential-indication area the residence number (住居番号). Empty for a lot number (地番): its branch number stays in banchi。address の一部。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/common/go",
      "x-translations": {
        "en": {
          "title": "Go",
          "description": "Go (号): in a residential-indication area the residence number (住居番号). Empty for a lot number (地番): its branch number stays in banchi. Part of address."
        }
      }
    },
    {
      "name": "address.buildingName",
      "description": "Building name, room number and anything below go。address の一部。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/common/buildingName",
      "x-translations": {
        "en": {
          "description": "Building name, room number and anything below go. Part of address."
        }
      }
    },
    {
      "name": "address.residentialIndication",
      "title": "true in a residential-indication area",
      "description": "true in a residential-indication area (banchi/go are block and residence numbers), false for lot numbers (地番)。address の一部。",
      "type": "boolean",
      "x-iri": "https://datamodels.jp/ns/common/residentialIndication",
      "x-translations": {
        "en": {
          "title": "true in a residential-indication area",
          "description": "true in a residential-indication area (banchi/go are block and residence numbers), false for lot numbers (地番). Part of address."
        }
      }
    },
    {
      "name": "address.jisPrefectureCode",
      "title": "Prefecture code",
      "description": "Prefecture code (JIS X 0401, 2 digits)。address の一部。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/common/jisPrefectureCode",
      "constraints": {
        "pattern": "\\d{2}"
      },
      "x-translations": {
        "en": {
          "title": "Prefecture code",
          "description": "Prefecture code (JIS X 0401, 2 digits). Part of address."
        }
      }
    },
    {
      "name": "address.jisMunicipalityCode",
      "title": "Municipality code",
      "description": "Municipality code (JIS X 0402, 5 digits including the prefecture code)。address の一部。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/common/jisMunicipalityCode",
      "constraints": {
        "pattern": "\\d{5}"
      },
      "x-translations": {
        "en": {
          "title": "Municipality code",
          "description": "Municipality code (JIS X 0402, 5 digits including the prefecture code). Part of address."
        }
      }
    },
    {
      "name": "address.localGovernmentCode",
      "title": "Local government code",
      "description": "Local government code (全国地方公共団体コード: JIS X 0402 plus a check digit, 6 digits)。address の一部。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/common/localGovernmentCode",
      "constraints": {
        "pattern": "\\d{6}"
      },
      "x-translations": {
        "en": {
          "title": "Local government code",
          "description": "Local government code (全国地方公共団体コード: JIS X 0402 plus a check digit, 6 digits). Part of address."
        }
      }
    },
    {
      "name": "address.abrMachiazaId",
      "title": "Address Base Registry town id",
      "description": "Address Base Registry town id (町字ID, 7 digits). Unique together with localGovernmentCode。address の一部。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/common/abrMachiazaId",
      "constraints": {
        "pattern": "\\d{7}"
      },
      "x-translations": {
        "en": {
          "title": "Address Base Registry town id",
          "description": "Address Base Registry town id (町字ID, 7 digits). Unique together with localGovernmentCode. Part of address."
        }
      }
    },
    {
      "name": "address.addressText",
      "title": "Full address as one normalised line",
      "description": "Full address as one normalised line. Also the fallback when structured fields are unavailable。address の一部。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/common/addressText",
      "x-translations": {
        "en": {
          "title": "Full address as one normalised line",
          "description": "Full address as one normalised line. Also the fallback when structured fields are unavailable. Part of address."
        }
      }
    },
    {
      "name": "unmatchedParts",
      "title": "入力のうち一致しなかった部分",
      "description": "入力のうち一致しなかった部分（入力の順）。たとえば建物名や階。複数の値は ; で区切ります。",
      "type": "list",
      "itemType": "string",
      "delimiter": ";",
      "x-iri": "https://models.geolonia.com/ns/geocoding#unmatchedParts",
      "x-translations": {
        "en": {
          "description": "Parts of the input that did not match, in input order, such as a building name or a floor. Several values separated by ;."
        }
      }
    },
    {
      "name": "matchLevel",
      "title": "一致した最も細かい単位",
      "description": "一致した最も細かい単位：prefecture（都道府県）、city（郡・市区町村）、machiaza（大字・町）、machiazaDetail（丁目・小字）、residentialBlock（街区符号）、residentialNumber（住居番号）、parcel（地番）。parcel は住居表示の 2 つの単位（residentialBlock、residentialNumber）の代わりになるもので、それより細かいわけではありません。当てはまる値が無いときは省き、ジオコーダーの値を matchLevelLabel に入れます。",
      "type": "string",
      "x-iri": "https://models.geolonia.com/ns/geocoding#matchLevel",
      "constraints": {
        "enum": [
          "prefecture",
          "city",
          "machiaza",
          "machiazaDetail",
          "residentialBlock",
          "residentialNumber",
          "parcel"
        ]
      },
      "x-translations": {
        "en": {
          "description": "The most detailed part of the address that matched: prefecture, city (county or municipality), machiaza (大字・町), machiazaDetail (丁目・小字), residentialBlock (街区符号, block number), residentialNumber (住居番号, residence number), parcel (地番, lot number). parcel is an alternative to the two residential levels (residentialBlock, residentialNumber), not more detailed than them. Left out when no value fits; the geocoder's own value goes in matchLevelLabel"
        }
      }
    },
    {
      "name": "coordinateLevel",
      "title": "座標がどの単位のものか",
      "description": "座標がどの単位のものか。値は matchLevel と同じです。matchLevel より粗いことがあります（住居番号まで一致しても、座標は町の代表点しか無いときなど）。",
      "type": "string",
      "x-iri": "https://models.geolonia.com/ns/geocoding#coordinateLevel",
      "constraints": {
        "enum": [
          "prefecture",
          "city",
          "machiaza",
          "machiazaDetail",
          "residentialBlock",
          "residentialNumber",
          "parcel"
        ]
      },
      "x-translations": {
        "en": {
          "description": "Which part of the address the coordinates belong to, with the same values as matchLevel. It can be less detailed than matchLevel: the address may match down to the residence number while the geocoder only has a point for the town"
        }
      }
    },
    {
      "name": "matchLevelLabel",
      "title": "ジオコーダーが返した一致の単位をそのまま、文字列で",
      "description": "ジオコーダーが返した一致の単位をそのまま、文字列で。数値で返すジオコーダーでは文字列にします（例：rsdtdsp_rsdt、\"3\"）。",
      "type": "string",
      "x-iri": "https://models.geolonia.com/ns/geocoding#matchLevelLabel",
      "x-translations": {
        "en": {
          "description": "The match level as the geocoder returns it, unchanged, as text: a geocoder that returns a number gives it as text (for example rsdtdsp_rsdt, or \"3\")"
        }
      }
    },
    {
      "name": "geocoder",
      "title": "結果を出したジオコーダーの名前",
      "description": "結果を出したジオコーダーの名前",
      "type": "string",
      "x-iri": "https://models.geolonia.com/ns/geocoding#geocoder",
      "x-translations": {
        "en": {
          "description": "Name of the geocoder that made the result"
        }
      }
    },
    {
      "name": "geocoderVersion",
      "title": "ジオコーダーの版",
      "description": "ジオコーダーの版",
      "type": "string",
      "x-iri": "https://models.geolonia.com/ns/geocoding#geocoderVersion",
      "x-translations": {
        "en": {
          "title": "Version of the geocoder",
          "description": "Version of the geocoder"
        }
      }
    },
    {
      "name": "datasetVersion",
      "title": "ジオコーダーが使った住所データの版",
      "description": "ジオコーダーが使った住所データの版",
      "type": "string",
      "x-iri": "https://models.geolonia.com/ns/geocoding#datasetVersion",
      "x-translations": {
        "en": {
          "description": "Version of the address data the geocoder used"
        }
      }
    },
    {
      "name": "dateGeocoded",
      "title": "ジオコーディングした日時",
      "description": "ジオコーディングした日時",
      "type": "datetime",
      "x-iri": "https://models.geolonia.com/ns/geocoding#dateGeocoded",
      "x-translations": {
        "en": {
          "title": "When the address was geocoded",
          "description": "When the address was geocoded"
        }
      }
    },
    {
      "name": "longitude",
      "title": "location の経度",
      "description": "location の経度（WGS 84、十進の度）",
      "type": "number",
      "x-iri": "https://uri.etsi.org/ngsi-ld/location",
      "constraints": {
        "minimum": -180,
        "maximum": 180
      },
      "x-translations": {
        "en": {
          "title": "Longitude of location in WGS 84",
          "description": "Longitude of location in WGS 84 (decimal degrees)"
        }
      }
    },
    {
      "name": "latitude",
      "title": "location の緯度",
      "description": "location の緯度（WGS 84、十進の度）",
      "type": "number",
      "x-iri": "https://uri.etsi.org/ngsi-ld/location",
      "constraints": {
        "minimum": -90,
        "maximum": 90
      },
      "x-translations": {
        "en": {
          "title": "Latitude of location in WGS 84",
          "description": "Latitude of location in WGS 84 (decimal degrees)"
        }
      }
    }
  ],
  "primaryKey": [
    "id"
  ],
  "missingValues": [
    ""
  ]
}
