{"id":211,"date":"2024-04-12T18:08:52","date_gmt":"2024-04-12T09:08:52","guid":{"rendered":"https:\/\/www.flumen-jp.com\/wordpress\/?p=211"},"modified":"2025-07-29T16:49:58","modified_gmt":"2025-07-29T07:49:58","slug":"ogr2ogr","status":"publish","type":"post","link":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/2024\/04\/12\/ogr2ogr\/","title":{"rendered":"CUI \u3067 GIS"},"content":{"rendered":"\n<p>\u2003\u4eca\u56de\u306f GIS \u3067\u4e3b\u984c\u56f3\u3092\u4f5c\u6210\u3059\u308b\u3068\u304d\u306b\u524d\u51e6\u7406\u3092 CUI \u3067\u884c\u3046\u3068\u4f55\u304b\u3068\u826f\u3044\u3053\u3068\u304c\u3042\u308b\u3001\u3068\u3044\u3046\u8a71\u3067\u3059\u3002<br>\u2003\u305d\u3053\u3067\u767b\u5834\u3059\u308b\u306e\u304c <a href=\"https:\/\/gdal.org\/programs\/ogr2ogr.html\"><strong>ogr2ogr<\/strong><\/a> \u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u30fc\u3067\u3059\u3002QGIS \u306e\u30e6\u30fc\u30b6\u30fc\u3067\u3042\u308c\u3070 ogr2ogr \u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u3067\u3059\u3002\u3068\u3044\u3046\u3088\u308a\u3001QGIS \u3067\u30d9\u30af\u30bf\u30fc\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u3068\u304d\u306e GUI \u306f ogr2ogr \u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u8a2d\u3051\u3089\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u6b86\u3069\u3067\u3059\u3002\u3053\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3092\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u5197\u9577\u306a\u4f5c\u696d\u304c\u5927\u5e45\u306b\u7701\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e8b \u4f8b<\/h3>\n\n\n\n<p>\u2003\u4ee5\u964d\u3001\u300c\uff08\u56fd\u540d\u3001\u9818\u571f\u3001\u9818\u4e3b\u304c\u73fe\u5728\u3068\u7570\u306a\u308b\uff09\u660e\u6cbb\u6642\u4ee3\u306e\u6771\u5357\u30a2\u30b8\u30a2\u306e\u5730\u56f3\u3092\u4f5c\u308b\u300d\u3068\u3044\u3046\u8ab2\u984c\u3092\u4f8b\u306b\u3068\u3063\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"638\" src=\"https:\/\/www.flumen-jp.com\/wordpress\/wp-content\/uploads\/2024\/04\/map-1024x638.png\" alt=\"\" class=\"wp-image-212\" srcset=\"https:\/\/www.flumen-jp.com\/wordpress\/wp-content\/uploads\/2024\/04\/map-1024x638.png 1024w, https:\/\/www.flumen-jp.com\/wordpress\/wp-content\/uploads\/2024\/04\/map-300x187.png 300w, https:\/\/www.flumen-jp.com\/wordpress\/wp-content\/uploads\/2024\/04\/map-768x478.png 768w, https:\/\/www.flumen-jp.com\/wordpress\/wp-content\/uploads\/2024\/04\/map.png 1376w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f5c\u696d\u624b\u9806<\/h3>\n\n\n\n<p>\u2003\u4f5c\u696d\u306e\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002\u4eca\u56de\u306f 2\uff5e5 \u306e\u4f5c\u696d\u3092\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3067\u4e00\u6c17\u306b\u51e6\u7406\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u57fa\u56f3\u306e\u30c7\u30fc\u30bf\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/li>\n\n\n\n<li>\u6771\u5357\u30a2\u30b8\u30a2\u57df\u306e\u30c7\u30fc\u30bf\u306e\u62bd\u51fa<\/li>\n\n\n\n<li>\u72ec\u7acb\u524d\u306e\u9818\u5730\u306e\u30dd\u30ea\u30b4\u30f3\u30c7\u30fc\u30bf\u306e\u4f5c\u6210<\/li>\n\n\n\n<li>\u5c5e\u6027\u306e\u5909\u66f4<\/li>\n\n\n\n<li>\u30c7\u30fc\u30bf\u306e\u96c6\u7d04<\/li>\n\n\n\n<li>QGIS \u306b\u3088\u308b\u4e3b\u984c\u56f3\u306e\u4f5c\u6210<\/li>\n<\/ol>\n\n\n\n<div style=\"height:27px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u74b0\u5883\u5909\u6570\u306e\u8a2d\u5b9a<\/h3>\n\n\n\n<p>\u2003ogr2ogr \u306e\u5177\u4f53\u7684\u306a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u3092 PATH \u74b0\u5883\u5909\u6570\u306b\u52a0\u3048\u307e\u3059\u3002\u307e\u305f\u3001ogr2ogr \u3067\u7528\u3044\u308b\u4ed6\u306e\u5909\u6570\uff08\u4eca\u56de\u672a\u4f7f\u7528\u306e\u5206\u3092\u542b\u3080\uff09\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u306e\u5148\u982d\u306b\u8a18\u8ff0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br>\u2003\u4ee5\u4e0b\u306f ogr2ogr \u304c C:\\OSGeo4W\\bin \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306e\u4f8b\u3067\u3059\u3002\u3053\u308c\u306b\u8a72\u5f53\u3057\u306a\u3044\u5834\u5408\u306f\u5b9f\u72b6\u306b\u3042\u308f\u305b\u3066\u5909\u6570 OSGEO4W \u3092\u66f8\u304d\u63db\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>@echo off\nsetlocal\nset OSGEO4W_ROOT=C:\\OSGEO4W\nset PATH=%OSGEO4W_ROOT%\\bin;%PATH%\ncall %OSGEO4W_ROOT%\\etc\\ini\\gdal.bat<\/code><\/pre><\/div>\n\n\n\n<p>\u2003\u4eca\u56de\u306f\u300c\u624b\u9806 4\u300d\u3067 Python \u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u306e\u3067\u3001\u3055\u3089\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>call %OSGEO4W_ROOT%\\etc\\ini\\python3.bat<\/code><\/pre><\/div>\n\n\n\n<div style=\"height:36px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u624b\u9806 1\u3000\u57fa\u56f3\u30c7\u30fc\u30bf\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h3>\n\n\n\n<p>\u2003\u4eca\u56de\u4f7f\u7528\u3057\u305f\u57fa\u56f3\u306f\u30d5\u30ea\u30fc\u306e\u4e16\u754c\u5730\u56f3\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b <a href=\"https:\/\/www.naturalearthdata.com\/downloads\/\">Natural Earth<\/a> \u3068\u3044\u3046\u30b5\u30a4\u30c8\u306e<a href=\"https:\/\/www.naturalearthdata.com\/downloads\/110m-cultural-vectors\/110m-admin-0-countries\/\">\u56fd\u5883\u30c7\u30fc\u30bf<\/a> \u300cne_110m_admin_0_countries.zip\u300d\u3067\u3059\u3002<br>\u2003ogrinfo.exe \u3067\u3053\u306e\u30c7\u30fc\u30bf\u306e\u4ed5\u69d8\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306b ogr \u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u30fc\u306f \/vsizip\/ \u3092\u63a5\u982d\u3059\u308b\u3068 zip \u30d5\u30a1\u30a4\u30eb\u306e\u89e3\u51cd\u304c\u5185\u90e8\u7684\u306b\u51e6\u7406\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>c:\\OSGeo4W\\bin\\ogrinfo -so \/vsizip\/ne_110m_admin_0_countries.zip ne_110m_admin_0_countries<\/code><\/pre><\/div>\n\n\n\n<p>\u3000\u3053\u308c\u306e\u51fa\u529b\u304b\u3089\u4ee5\u4e0b\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306f ESRI Shapefile<\/li>\n\n\n\n<li>\u5ea7\u6a19\u53c2\u7167\u7cfb\u306f WGS 84<\/li>\n\n\n\n<li>\u56fd\u540d\u3001\u56fd\u540d\u3092\u8868\u793a\u3059\u308b\u8efd\u5ea6\u3068\u7def\u5ea6\u306e\u5c5e\u6027\u540d\u306f NAME_JA\u3001LABEL_X\u3001LABEL_Y<\/li>\n<\/ul>\n\n\n\n<div style=\"height:39px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u624b\u9806 2\u3000\u6771\u5357\u30a2\u30b8\u30a2\u57df\u306e\u30c7\u30fc\u30bf\u306e\u62bd\u51fa<\/h3>\n\n\n\n<p>\u2003\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u57fa\u56f3\u306e\u30c7\u30fc\u30bf\u304b\u3089\u6240\u671b\u306e\u6771\u5357\u30a2\u30b8\u30a2\u57df\u306e\u30c7\u30fc\u30bf\u3092 southEastAsia.json \u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u62bd\u51fa\u3057\u307e\u3059\u3002<a href=\"https:\/\/ja.wikipedia.org\/wiki\/GeoJSON\">GeoJson<\/a> \u306f\u30d9\u30af\u30bf\u30fc\u30c7\u30fc\u30bf\u306e\u305f\u3081\u306e <a href=\"https:\/\/ja.wikipedia.org\/wiki\/JavaScript_Object_Notation\">JSON<\/a> \u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>If exist southEastAsia.json del southEastAsia.json\nogr2ogr ^\n    -nln southEastAsia ^\n    -lco COORDINATE_PRECISION=5 ^\n    -sql &quot;SELECT NAME_JA AS NAME, LABEL_X AS X, LABEL_Y AS Y FROM ne_110m_admin_0_countries&quot; ^\n    -clipsrc 45 -12 150 45 ^\n    southEastAsia.json \/vsizip\/ne_110m_admin_0_countries.zip<\/code><\/pre><\/div>\n\n\n\n<p>\u2003ogr2ogr \u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u4ee5\u4e0b\u3067\u4e0e\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30ec\u30a4\u30e4\u30fc\u540d\u306f southEastAsia<\/li>\n\n\n\n<li>\u56fd\u5883\u7dda\u306e\u5ea7\u6a19\u306f\u5c0f\u6570\u70b9\u4ee5\u4e0b 5 \u6841<\/li>\n\n\n\n<li>\u5c5e\u6027\u306f NAME_JA\u3001LABEL_X\u3001LABEL_Y \u3060\u3051\u3092\u53d6\u51fa\u3057\u3066\u3001\u5c5e\u6027\u540d\u3092 NAME\u3001X\u3001Y \u306b\u5909\u66f4<\/li>\n\n\n\n<li>\u62bd\u51fa\u3059\u308b\u9818\u57df\u306f\u5357\u897f\u7aef\u3068\u5317\u6771\u7aef\u306e\u7def\u5ea6\u30fb\u7d4c\u5ea6\u3092 (-12, 45)\u3001(45, 150) \u3067\u6307\u5b9a<\/li>\n<\/ul>\n\n\n\n<div style=\"height:36px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u624b\u9806 3\u3000\u72ec\u7acb\u524d\u306e\u9818\u5730\u306e\u30dd\u30ea\u30b4\u30f3\u30c7\u30fc\u30bf\u306e\u4f5c\u6210<\/h3>\n\n\n\n<p>\u2003\u4ee5\u4e0b\u306e\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u306f\u6b21\u306e\u64cd\u4f5c\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30ab\u30f3\u30dc\u30b8\u30a2\u3001\u30e9\u30aa\u30b9\u3001\u30d9\u30c8\u30ca\u30e0\u306e\u30c7\u30fc\u30bf\u304b\u3089\u30a4\u30f3\u30c9\u30b7\u30ca\u9023\u90a6\u306e\u30dd\u30ea\u30b4\u30f3\u30c7\u30fc\u30bf indochina.json \u3092\u4f5c\u6210<\/li>\n\n\n\n<li>\u30a4\u30f3\u30c9\u3001\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5\u306e\u30c7\u30fc\u30bf\u304b\u3089\u30a4\u30f3\u30c9\u5e1d\u56fd\u306e\u30dd\u30ea\u30b4\u30f3\u30c7\u30fc\u30bf india.json \u3092\u4f5c\u6210<\/li>\n<\/ul>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>set UNION=SELECT ST_Union(ST_buffer(geometry, 0.0001)) AS geometry\nset UNION=%UNION% FROM southEastAsia WHERE NAME IN\n\nogr2ogr ^\n    -lco COORDINATE_PRECISION=5 ^\n    -dialect sqlite ^\n    -sql &quot;%UNION% (&#39;\u30ab\u30f3\u30dc\u30b8\u30a2&#39;, &#39;\u30e9\u30aa\u30b9&#39;, &#39;\u30d9\u30c8\u30ca\u30e0&#39;)&quot; ^\n    indochina.json southEastAsia.json\n\nogr2ogr ^\n    -lco COORDINATE_PRECISION=5 ^\n    -dialect sqlite ^\n    -sql &quot;%UNION% (&#39;\u30a4\u30f3\u30c9&#39;, &#39;\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5&#39;)&quot; ^\n    india.json southEastAsia.json<\/code><\/pre><\/div>\n\n\n\n<p>\u2003 \u30dd\u30ea\u30b4\u30f3\u306e\u5408\u4f75\uff08union\uff09\u51e6\u7406\u306b\u306f <a href=\"https:\/\/www.sqlite.org\/\">SQLite<\/a> \u306e ST_Union \u95a2\u6570\u3092\u7528\u3044\u307e\u3059\u3002\u3053\u306e\u95a2\u6570\u306f<a href=\"https:\/\/ja.wikipedia.org\/wiki\/SQL\">\u6a19\u6e96 SQL<\/a>\u306b\u306f\u306a\u3044\u306e\u3067 dialect\uff08\u65b9\u8a00\uff09\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4e0e\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"height:28px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u624b\u9806 4\u3000\u5c5e\u6027\u306e\u5909\u66f4<\/h3>\n\n\n\n<p>\u2003Python \u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u5c5e\u6027\u3092\u4e3b\u984c\u56f3\u7528\u306e\u3082\u306e\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>python edit_props.py<\/code><\/pre><\/div>\n\n\n\n<p>\u2003edit_props.py \u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002southEastAsia.json\u3001indochina.json\u3001india.json \u306e\u56fd\u540d\u3092\u65e7\u56fd\u540d\u306b\u5909\u66f4\u3057\u3001\u65b0\u305f\u306a\u5c5e\u6027\u3068\u3057\u3066\u7d71\u6cbb\u56fd\u306e\u982d\u6587\u5b57\uff08\u56f3\u4e2d\u306e\u51e1\u4f8b\u306e\u30ab\u30c6\u30b4\u30ea\uff09\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\u5f8c\u4e8c\u8005\u306b\u3064\u3044\u3066\u306f\u30e9\u30d9\u30eb\u306e\u4f4d\u7f6e\u3082\u5909\u66f4\u3057\u307e\u3059\u3002\u307e\u305f\u5143\u306e southEastAsia.json \u304b\u3089\u30a4\u30f3\u30c9\u30b7\u30ca\u9023\u90a6\u3068\u30a4\u30f3\u30c9\u5e1d\u56fd\u306e\u69cb\u6210\u56fd\u304c\u9664\u304b\u308c\u307e\u3059\u3002(Geo)Json \u306f Python \u306e\u8f9e\u66f8\u578b\u3042\u308b\u3044\u306f\u8f9e\u66f8\u578b\u306e\u30ea\u30b9\u30c8\u306b\u5909\u63db\u53ef\u80fd\u306a\u306e\u3067\u3001\u3053\u306e\u3088\u3046\u306a\u51e6\u7406\u304c\u6bd4\u8f03\u7684\u5bb9\u6613\u306b\u884c\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>import json\n\ndef get_json(path):\n\n    with open(path, encoding=&quot;utf-8&quot;) as f:\n        return json.load(f)\n\ndef over_write(path, js):\n\n    with open(path, &quot;w&quot;, encoding=&quot;utf-8&quot;) as f:\n        json.dump(js, f, ensure_ascii=False)\n\ndef edit_multi():\n\n    skipes = (&quot;\u30ab\u30f3\u30dc\u30b8\u30a2&quot;, &quot;\u30e9\u30aa\u30b9&quot;, &quot;\u30d9\u30c8\u30ca\u30e0&quot;, &quot;\u30a4\u30f3\u30c9&quot;, &quot;\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5&quot;)\n    countries = {\n        &quot;\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2&quot;: {&quot;name_old&quot;: &quot;\u30aa\u30e9\u30f3\u30c0\u9818\u6771\u30a4\u30f3\u30c9&quot;, &quot;ADMIN&quot;: &quot;N&quot;},\n        &quot;\u30bf\u30a4\u738b\u56fd&quot;: {&quot;name_old&quot;: &quot;\u30b7\u30e3\u30e0&quot;, &quot;ADMIN&quot;: &quot;O&quot;},\n        &quot;\u30df\u30e3\u30f3\u30de\u30fc&quot;: {&quot;name_old&quot;: &quot;\u30d3\u30eb\u30de&quot;, &quot;ADMIN&quot;: &quot;E&quot;},\n        &quot;\u30d1\u30ad\u30b9\u30bf\u30f3&quot;: {&quot;name_old&quot;: &quot;\u30d0\u30eb\u30c1\u30b9\u30bf\u30f3&quot;, &quot;ADMIN&quot;: &quot;E&quot;},\n        &quot;\u30a2\u30d5\u30ac\u30cb\u30b9\u30bf\u30f3&quot;: {&quot;name_old&quot;: &quot;\u30a2\u30d5\u30ac\u30cb\u30b9\u30bf\u30f3&quot;, &quot;ADMIN&quot;: &quot;E&quot;},\n        &quot;\u30b9\u30ea\u30e9\u30f3\u30ab&quot;: {&quot;name_old&quot;: &quot;\u30bb\u30a4\u30ed\u30f3&quot;, &quot;ADMIN&quot;: &quot;E&quot;},\n        &quot;\u4e2d\u83ef\u4eba\u6c11\u5171\u548c\u56fd&quot;: {&quot;name_old&quot;: &quot;\u6e05&quot;, &quot;ADMIN&quot;: &quot;O&quot;},\n        &quot;\u4e2d\u83ef\u6c11\u56fd&quot;: {&quot;name_old&quot;: &quot;\u53f0\u6e7e&quot;, &quot;ADMIN&quot;: &quot;J&quot;},\n        &quot;\u30d5\u30a3\u30ea\u30d4\u30f3&quot;: {&quot;name_old&quot;: &quot;\u30d5\u30a3\u30ea\u30d4\u30f3&quot;, &quot;ADMIN&quot;: &quot;S&quot;},\n        &quot;\u30de\u30ec\u30fc\u30b7\u30a2&quot;: {&quot;name_old&quot;: &quot;\u30de\u30e9\u30a4\u9023\u90a6&quot;, &quot;ADMIN&quot;: &quot;E&quot;},\n        &quot;\u30cd\u30d1\u30fc\u30eb&quot;: {&quot;name_old&quot;: &quot;\u30cd\u30d1\u30fc\u30eb&quot;, &quot;ADMIN&quot;: &quot;O&quot;}\n    }\n\n    js = get_json(&quot;southEastAsia.json&quot;)\n\n    pop_indexes = []\n    for idx, feat in enumerate(js[&quot;features&quot;]):\n        props = feat[&quot;properties&quot;] \n        name  = props[&quot;NAME&quot;]\n        if name in skipes:\n            pop_indexes.append(idx)\n        elif name in countries:\n            obj = countries[name]\n            props[&quot;NAME&quot;]  = obj[&quot;name_old&quot;] # \u65e7\u56fd\u540d\n            props[&quot;ADMIN&quot;] = obj[&quot;ADMIN&quot;]    # \u7d71\u6cbb\u56fd\u306e\u982d\u6587\u5b57\n        else: # \u56f3\u4e2d\u306b\u56fd\u5883\u306e\u307f\u8868\u793a\uff08\u56fd\u540d\u975e\u8868\u793a\uff09\n            props[&quot;NAME&quot;]  = &quot;&quot;\n            props[&quot;ADMIN&quot;] = &quot;O&quot;\n\n    # southEastAsia.json \u304b\u3089\u30ab\u30f3\u30dc\u30b8\u30a2\u3001\u30e9\u30aa\u30b9\u3001\u30d9\u30c8\u30ca\u30e0\n    # \u30a4\u30f3\u30c9\u3001\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5\u306e\u30c7\u30fc\u30bf\u3092\u6d88\u53bb\n    for idx in reversed(pop_indexes):\n        js[&quot;features&quot;].pop(idx)\n\n    over_write(&quot;southEastAsia.json&quot;, js)\n\ndef edit_single(path, NAME, X, Y, ADMIN):\n\n    js = get_json(path)\n\n    props = js[&quot;features&quot;][0][&quot;properties&quot;] \n    props[&quot;NAME&quot;]  = NAME\n    props[&quot;X&quot;]     = X # \u30e9\u30d9\u30eb\u306e\u8868\u793a\u4f4d\u7f6e\uff08\u7d4c\u5ea6\uff09\n    props[&quot;Y&quot;]     = Y # \u30e9\u30d9\u30eb\u306e\u8868\u793a\u4f4d\u7f6e\uff08\u7def\u5ea6\uff09\n    props[&quot;ADMIN&quot;] = ADMIN\n\n    over_write(path, js)\n\nif __name__ == &quot;__main__&quot;:\n\n    edit_multi()\n    edit_single(&quot;indochina.json&quot;, &quot;\u30a4\u30f3\u30c9\u30b7\u30ca\u9023\u90a6&quot;, 107.6, 13.5, &quot;F&quot;)\n    edit_single(&quot;india.json&quot;,     &quot;\u30a4\u30f3\u30c9\u5e1d\u56fd&quot;,      76.1, 22.0, &quot;E&quot;)<\/code><\/pre><\/div>\n\n\n\n<div style=\"height:38px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u624b\u9806 5\u3000\u30c7\u30fc\u30bf\u306e\u96c6\u7d04<\/h3>\n\n\n\n<p>\u2003\u6539\u3081\u3066 indochina.json \u3068 india.json \u3092 southEastAsia.json \u306b\u8ffd\u52a0\u3057\u3066\u4e3b\u984c\u56f3\u7528\u306e\u30c7\u30fc\u30bf\u3092\u5b8c\u6210\u3057\u307e\u3059\u3002\u6700\u5f8c\u306b\u7121\u7528\u306b\u306a\u3063\u305f india.json \u306f southEastAsia.json \u306f\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ogr2ogr -update -append southEastAsia.json indochina.json\nogr2ogr -update -append southEastAsia.json india.json\ndel indochina.json india.json<\/code><\/pre><\/div>\n\n\n\n<p>\u2003\u624b\u9806 2~5 \u3092\u518d\u63b2\u3057\u305f\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u9069\u5f53\u306a\u540d\u524d\u3001\u4f8b\u3048\u3070 make_map.bat \u306b\u30bb\u30fc\u30d6\u3057\u307e\u3059\uff08\u5168\u89d2\u6587\u5b57\u3092\u542b\u3080\u306e\u3067\u6587\u5b57\u30b3\u30fc\u30c9\u306f shift-jis\uff09\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>: ne_110m_admin_0_countries.zip\n:    https:\/\/www.naturalearthdata.com\/downloads\/110m-cultural-vectors\/110m-admin-0-countries\/\n\n@echo off\nsetlocal\nset OSGEO4W_ROOT=C:\\OSGeo4W\nset PATH=%OSGEO4W_ROOT%\\bin;%PATH%\ncall %OSGEO4W_ROOT%\\etc\\ini\\gdal.bat\ncall %OSGEO4W_ROOT%\\etc\\ini\\python3.bat\n\nIf exist southEastAsia.json del southEastAsia.json\nogr2ogr ^\n    -nln southEastAsia ^\n    -lco COORDINATE_PRECISION=5 ^\n    -sql &quot;SELECT NAME_JA AS NAME, LABEL_X AS X, LABEL_Y AS Y FROM ne_110m_admin_0_countries&quot; ^\n    -clipsrc 45 -12 150 45 ^\n    clipped.json \/vsizip\/ne_110m_admin_0_countries.zip\n\nset UNION=SELECT ST_Union(ST_buffer(geometry, 0.0001)) AS geometry\nset UNION=%UNION% FROM southEastAsia WHERE NAME IN\n\nogr2ogr ^\n    -lco COORDINATE_PRECISION=5 ^\n    -dialect sqlite ^\n    -sql &quot;%UNION% (&#39;\u30ab\u30f3\u30dc\u30b8\u30a2&#39;, &#39;\u30e9\u30aa\u30b9&#39;, &#39;\u30d9\u30c8\u30ca\u30e0&#39;)&quot; ^\n    indochina.json southEastAsia.json\n\nogr2ogr ^\n    -lco COORDINATE_PRECISION=5 ^\n    -dialect sqlite ^\n    -sql &quot;%UNION% (&#39;\u30a4\u30f3\u30c9&#39;, &#39;\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5&#39;)&quot; ^\n    india.json southEastAsia.json\n\npython edit_layers.py\n\nogr2ogr -update -append southEastAsia.json indochina.json\nogr2ogr -update -append southEastAsia.json india.json\ndel indochina.json india.json<\/code><\/pre><\/div>\n\n\n\n<div style=\"height:36px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u624b\u9806 6\u3000\u4e3b\u984c\u56f3\u306e\u4f5c\u6210<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>make_map<\/code><\/pre><\/div>\n\n\n\n<p>\u3067\u4f5c\u6210\u3055\u308c\u308b southEastAsia.json \u3092 QGIS \u306b\u8aad\u307f\u8fbc\u3093\u3067\u304a\u597d\u307f\u306e\u4e3b\u984c\u56f3\u306b\u4ed5\u4e0a\u3052\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30e9\u30d9\u30eb\u4f4d\u7f6e\u306e\u5fae\u8abf\u6574<\/li>\n\n\n\n<li>\u51e1\u4f8b\u306e\u8ffd\u52a0\uff08\u30cf\u30c3\u30c1\u30f3\u30b0\u30d1\u30bf\u30fc\u30f3\u3001\u30ab\u30c6\u30b4\u30ea\u540d\uff09<\/li>\n\n\n\n<li>\u5370\u5237\u30ec\u30a4\u30a2\u30a6\u30c8<\/li>\n\n\n\n<li>\u305d\u306e\u4ed6\u7d30\u3005<\/li>\n<\/ul>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h3>\n\n\n\n<p>\u2003make_map.bat \u306f\u4ee5\u524d\u3069\u3053\u304b\u3067\u4f5c\u3063\u305f\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u304b\u304d\u96c6\u3081\u3066\u4eca\u56de\u306e\u554f\u984c\u306b\u5408\u308f\u305b\u3066\u5fae\u4fee\u6b63\u3057\u305f\u3082\u306e\u3067\u3059\u3002\u306a\u306e\u3067\u3001\u3053\u3053\u3067\u66f8\u304d\u4e0b\u308d\u3057\u305f\u306e\u306f edit_props.py \u3060\u3051\u3067\u3059\u3002\u307e\u305f\u5f53\u7136\u3001\u4e00\u56de\u3067\u4e3b\u984c\u56f3\u306e\u30c7\u30fc\u30bf\u304c\u3067\u304d\u305f\u8a33\u3067\u306f\u306a\u304f\u3066\u4f55\u5ea6\u304b\u306e\u8a66\u884c\u932f\u8aa4\u3092\u4f34\u3044\u307e\u3057\u305f\u3002<br>\u3000\u3064\u307e\u308a\u3001\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u5229\u7528\u3059\u308b\u30e1\u30ea\u30c3\u30c8\u3068\u3057\u3066\u306f\u4ee5\u4e0b\u304c\u6319\u3052\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f55\u5ea6\u3067\u3082\u5931\u6557\u3067\u304d\u308b<\/li>\n\n\n\n<li>\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304d\u63db\u3048\u308b\u3053\u3068\u3067\u985e\u4f3c\u306e\u554f\u984c\u3067\u518d\u5229\u7528\u3067\u304d\u308b<\/li>\n\n\n\n<li>\u30c7\u30fc\u30bf\u52a0\u5de5\u306e\u5c65\u6b74\u304c\u4fdd\u5b58\u3067\u304d\u308b<\/li>\n<\/ul>\n\n\n\n<p>\u2003GUI \u306e\u5834\u5408\u306f\u5931\u6557\u3057\u305f\u3089\u6700\u521d\u304b\u3089\u3084\u308a\u76f4\u3057\u306b\u306a\u308b\u306e\u3067\u3001\u4e00\u756a\u76ee\u306e\u300c\u4f55\u5ea6\u3067\u3082\u5931\u6557\u3067\u304d\u308b\u300d\u306f\u7279\u306b\u5927\u304d\u306a\u30e1\u30ea\u30c3\u30c8\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2003\u4eca\u56de\u306f GIS \u3067\u4e3b\u984c\u56f3\u3092\u4f5c\u6210\u3059\u308b\u3068\u304d\u306b\u524d\u51e6\u7406\u3092 CUI \u3067\u884c\u3046\u3068\u4f55\u304b\u3068\u826f\u3044\u3053\u3068\u304c\u3042\u308b\u3001\u3068\u3044\u3046\u8a71\u3067\u3059\u3002\u2003\u305d\u3053\u3067\u767b\u5834\u3059\u308b\u306e\u304c ogr2ogr \u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u30fc\u3067\u3059\u3002QGIS \u306e\u30e6\u30fc\u30b6\u30fc\u3067\u3042\u308c\u3070 ogr2og [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[18,21,22,20,17,19],"class_list":["post-211","post","type-post","status-publish","format-standard","hentry","category-it","tag-cui","tag-geojson","tag-gis","tag-j-son","tag-ogr2ogr","tag-python"],"_links":{"self":[{"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=211"}],"version-history":[{"count":15,"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/211\/revisions"}],"predecessor-version":[{"id":618,"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/211\/revisions\/618"}],"wp:attachment":[{"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}