国土数値情報ダウンロードサービス

国土交通省国土政策局がGISで利用可能な国土数値情報を 機械判読可能な形式(XML)で取得できるAPI(Application Programming Interface) を提供します。

api provider: 
api: 
GISで利用可能な国土数値情報を 機械判読可能な形式で取得できるAPI
example: 

国土数値情報の概要情報取得

$ curl -s "http://nlftp.mlit.go.jp/ksj/api/1.0b/index.php/app/getKSJSummary.xml?appId=ksjapibeta1&lang=J&dataformat=1" | xml2json | jq -r '.KSJ_SUMMARY_INF.KSJ_SUMMARY.item[] | [.identifier, .title, .field1, .field2, .areaType] | @csv'
"A03","三大都市圏計画区域","政策区域","大都市圏","2"
"A09","都市地域","国土(水・土地)","土地利用","3"
"A10","自然公園地域","地域","保護保全","3"
"A11","自然保全地域","地域","保護保全","3"
"A12","農業地域","国土(水・土地)","土地利用","3"
"A13","森林地域","国土(水・土地)","土地利用","3"
"A15","鳥獣保護区","地域","保護保全","3"
"A16","人口集中地区","政策区域","-","3"
"A17","過疎地域","政策区域","条件不利地域","3"
"A18","半島振興対策実施地域","政策区域","条件不利地域","3"
"A18s-a","半島振興対策実施地域統計情報","政策区域","条件不利地域","1"
"A19","離島振興対策実施地域","政策区域","条件不利地域","3"
"A19s","離島振興対策実施地域統計情報","政策区域","条件不利地域","3"
"A20","奄美群島","政策区域","条件不利地域","2"
"A20s","奄美群島統計情報","政策区域","条件不利地域","3"
"A21","小笠原諸島","政策区域","条件不利地域","3"
"A21s","小笠原諸島統計情報","政策区域","条件不利地域","3"
"A22","豪雪地帯","政策区域","条件不利地域","3"
"A22-m","豪雪地帯(気象データ等)","政策区域","条件不利地域","3"
"A22s","豪雪地帯統計情報","政策区域","条件不利地域","3"
"A23","特殊土壌地帯","政策区域","条件不利地域","3"
"A24","振興山村","政策区域","条件不利地域","3"
"A25","特定農山村地域","政策区域","条件不利地域","3"
"A26","土砂災害危険箇所","政策区域","災害・防災","3"
"A27","小学校区","政策区域","-","3"
"A28","世界自然遺産","地域","地域資源・観光","1"
"A29","用途地域","国土(水・土地)","土地利用","3"
"A30a5","土砂災害・雪崩メッシュ","政策区域","災害・防災","4"
"A30b","竜巻等突風","政策区域","災害・防災","1"
"A31","浸水想定区域","政策区域","災害・防災","3"
"A32","中学校区","政策区域","-","3"
"A33","土砂災害警戒区域","政策区域","災害・防災","3"
"A34","世界文化遺産","地域","地域資源・観光","3"
"A35a","景観計画区域","政策区域","-","3"
"A35b","景観地区・準景観地区","政策区域","-","3"
"A35c","景観重要建造物・樹木","政策区域","-","3"
"A37","半島循環道路","政策区域","条件不利地域","3"
"A38","医療圏","政策区域","-","3"
"C02","港湾","交通","-","1"
"C09","漁港","交通","-","1"
"C23","海岸線","国土(水・土地)","水域","3"
"C28","空港","交通","-","1"
"G02","平年値メッシュ","政策区域","災害・防災","4"
"G04-a","標高・傾斜度3次メッシュ","国土(水・土地)","地形","4"
"G04-c","標高・傾斜度4次メッシュ","国土(水・土地)","地形","4"
"G04-d","標高・傾斜度5次メッシュ","国土(水・土地)","地形","4"
"L01","地価公示","国土(水・土地)","地価","3"
"L02","都道府県地価調査","国土(水・土地)","地価","3"
"L03-a","土地利用3次メッシュ","国土(水・土地)","土地利用","4"
"L03-b","土地利用細分メッシュ","国土(水・土地)","土地利用","4"
"L03-b-u","都市地域土地利用細分メッシュ","国土(水・土地)","土地利用","4"
"L05","工業用地","地域","施設","3"
"N02","鉄道","交通","-","1"
"N03","行政区域","政策区域","-","3"
"N04","道路密度・道路延長メッシュ","交通","-","4"
"N05","鉄道時系列","交通","-","1"
"N06","高速道路時系列","交通","-","1"
"N07","バスルート","交通","-","3"
"N08","空港時系列","交通","-","1"
"N09","定期旅客航路","交通","-","1"
"N10","緊急輸送道路","交通","-","3"
"N11","ヘリポート","交通","-","3"
"P02","公共施設","地域","施設","3"
"P03","発電所","地域","施設","1"
"P04","医療機関","地域","施設","3"
"P05","市町村役場等及び公的集会施設","地域","施設","3"
"P07","燃料給油所","地域","施設","3"
"P09","宿泊容量メッシュ","地域","地域資源・観光","4"
"P11","バス停留所","交通","-","3"
"P12","観光資源","地域","地域資源・観光","1"
"P13","都市公園","地域","施設","3"
"P14","福祉施設","地域","施設","3"
"P15","廃棄物処理施設","地域","施設","3"
"P16","研究機関","地域","施設","3"
"P17","消防署","地域","施設","3"
"P18","警察署","地域","施設","3"
"P19","地域資源","地域","地域資源・観光","3"
"P20","避難施設","政策区域","災害・防災","3"
"P21","上水道関連施設","地域","施設","3"
"P22","下水道関連施設","地域","施設","3"
"P23","海岸保全施設","国土(水・土地)","水域","3"
"P24","地場産業関連施設","地域","施設","1"
"P26","ニュータウン","地域","施設","3"
"P27","文化施設","地域","施設","3"
"P28","国・都道府県の機関等","地域","施設","3"
"P29","学校","地域","施設","3"
"P30","郵便局","地域","施設","3"
"P31","物流拠点","地域","施設","3"
"P32","都道府県指定文化財","地域","地域資源・観光","3"
"P33","集客施設","地域","施設","3"
"P34","市区町村役場","地域","施設","3"
"S05-a","交通流動量 パーソントリップ発生・集中量","交通","パーソントリップ","2"
"S05-b","交通流動量 パーソントリップOD量","交通","パーソントリップ","2"
"S05-c","交通流動量 駅別乗降数","交通","-","2"
"S05-d","交通流動量 貨物・旅客地域流動量","交通","パーソントリップ","1"
"S10a","港湾間流通量・海上経路","交通","-","1"
"S10b","空港間流通量","交通","-","1"
"S12","駅別乗降客数","交通","-","1"
"W01","ダム","国土(水・土地)","水域","1"
"W05","河川","国土(水・土地)","水域","3"
"W07","流域メッシュ","国土(水・土地)","水域","4"
"W09","湖沼","国土(水・土地)","水域","1"

国土数値情報取得のURL情報取得

$ curl -s "http://nlftp.mlit.go.jp/ksj/api/1.0b/index.php/app/getKSJURL.xml?appId=ksjapibeta1&lang=J&dataformat=1&identifier=N03" | xml2json | jq -r '.KSJ_URL_INF.KSJ_URL.item[] | [.identifier, .areaCode, .year, .title, .field, .zipFileUrl, .zipFileSize, .datum, .areaType] | @csv' | csvcut -c 1,2,3,4,6 | head
N03,1,1920,行政区域,http://nlftp.mlit.go.jp/ksj/gml/data/N03/N03-20/N03-200101_01_GML.zip
N03,1,1950,行政区域,http://nlftp.mlit.go.jp/ksj/gml/data/N03/N03-50/N03-501001_01_GML.zip
N03,2,1950,行政区域,http://nlftp.mlit.go.jp/ksj/gml/data/N03/N03-50/N03-501001_02_GML.zip
N03,3,1950,行政区域,http://nlftp.mlit.go.jp/ksj/gml/data/N03/N03-50/N03-501001_03_GML.zip
N03,4,1950,行政区域,http://nlftp.mlit.go.jp/ksj/gml/data/N03/N03-50/N03-501001_04_GML.zip
N03,5,1950,行政区域,http://nlftp.mlit.go.jp/ksj/gml/data/N03/N03-50/N03-501001_05_GML.zip
N03,6,1950,行政区域,http://nlftp.mlit.go.jp/ksj/gml/data/N03/N03-50/N03-501001_06_GML.zip
N03,7,1950,行政区域,http://nlftp.mlit.go.jp/ksj/gml/data/N03/N03-50/N03-501001_07_GML.zip
N03,8,1950,行政区域,http://nlftp.mlit.go.jp/ksj/gml/data/N03/N03-50/N03-501001_08_GML.zip
N03,9,1950,行政区域,http://nlftp.mlit.go.jp/ksj/gml/data/N03/N03-50/N03-501001_09_GML.zip
$ curl -s "http://nlftp.mlit.go.jp/ksj/api/1.0b/index.php/app/getKSJURL.xml?appId=ksjapibeta1&lang=J&dataformat=1&identifier=N03&prefCode=13&fiscalyear=2014" | xml2json | jq .
{
  "KSJ_URL_INF": {
    "KSJ_URL": {
      "item": {
        "areaCode": "13",
        "title": "行政区域",
        "zipFileSize": "3.95MB",
        "field": "政策区域",
        "datum": "1",
        "identifier": "N03",
        "areaType": "3",
        "year": "2014",
        "zipFileUrl": "http://nlftp.mlit.go.jp/ksj/gml/data/N03/N03-14/N03-140401_13_GML.zip"
      }
    },
    "RESULT": {
      "ERROR_MSG": "正常に終了しました。",
      "DATE": "2017/04/30T06:34:48+9:00",
      "STATUS": "0"
    },
    "PARAMETER": {
      "metroArea": " ",
      "dataformat": "1",
      "lang": "J",
      "fiscalyear": "2014",
      "meshCode": " ",
      "appId": "ksjapibeta1",
      "identifier": "N03",
      "prefCode": "13"
    },
    "NUMBER": "1"
  }
}

ダウンロードしたXML圧縮ファイル

$ wget http://nlftp.mlit.go.jp/ksj/gml/data/L01/L01-83/L01-83_01_GML.zip
$ unzip L01-83_01_GML.zip
$ nkf L01-83_01-g.xml | xml2json | jq -r '."{http://nlftp.mlit.go.jp/ksj/schemas/ksj-app}Dataset"."{http://nlftp.mlit.go.jp/ksj/schemas/ksj-app}LandPrice"[] | [."{http://nlftp.mlit.go.jp/ksj/schemas/ksj-app}address"."#text", ."{http://nlftp.mlit.go.jp/ksj/schemas/ksj-app}postedLandPrice"."#text"] | @csv' | head
"北海道 上磯郡上磯町字谷好町77番2","15600"
"北海道 上磯郡上磯町字清川639番1","5600"
"北海道 亀田郡大野町字本郷126番10","17500"
"北海道 亀田郡大野町本町87番1","17900"
"北海道 亀田郡大野町本町742番6","25000"
"北海道 亀田郡大野町字南大野121番2","6000"
"北海道 上磯郡上磯町中央2−2−28","33000"
"北海道 亀田郡大野町字稲里150番1","7500"
"北海道 上磯郡上磯町久根別2−13−5","30000"
"北海道 上磯郡上磯町久根別4−11−20","18600"