{"id":26,"date":"2018-06-15T23:54:21","date_gmt":"2018-06-15T14:54:21","guid":{"rendered":"https:\/\/scc.kokushin-u.jp\/?p=26"},"modified":"2018-06-16T01:11:16","modified_gmt":"2018-06-15T16:11:16","slug":"add-object-to-osm-locally-for-univ","status":"publish","type":"post","link":"https:\/\/scc.kokushin-u.jp\/2018\/06\/15\/add-object-to-osm-locally-for-univ\/","title":{"rendered":"OpenStreetMap\u306e\u30c7\u30fc\u30bf\u306b\u72ec\u81ea\u306b\u5730\u7269\u3092\u8ffd\u52a0\u3057\u3066nginx\u3067\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u3057\u3066\u5927\u5b66\u306e\u30a2\u30af\u30bb\u30b9\u30de\u30c3\u30d7\u3092\u4f5c\u3063\u305f"},"content":{"rendered":"

\u4e45\u3005\u306e\u30d6\u30ed\u30b0\u3067\u3059\uff01<\/p>\n

\u4eca\u56de\u306e\u8a18\u4e8b\u306f\u6280\u8853\u7684\u306a\u5185\u5bb9\u304c\u591a\u3044\u306e\u3067\u3001\u8208\u5473\u306a\u3044\u65b9\u306f\u9069\u5f53\u306b\u98db\u3070\u3057\u306a\u304c\u3089\u8aad\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n

\u56fd\u969b\u4fe1\u5dde\u5b66\u9662\u5927\u5b66<\/a>\u306f\u90fd\u4f1a\u306e\u5927\u5b66\u3068\u9055\u3063\u3066\u5341\u5206\u306a\u4e88\u7b97\u304c\u3042\u308b\u308f\u3051\u3067\u3082\u306a\u3044\u306e\u3067HP\u5236\u4f5c\u3082\u5916\u6ce8\u305b\u305a\u5b66\u5185\u3067\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u50d5\u9054\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u540c\u597d\u4f1a\u306b\u3082\u5927\u5b66\u306eHP\u306e\u5236\u4f5c\u306e\u4ed5\u4e8b\u304c\u56de\u3063\u3066\u304f\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n

\u4eca\u56de\u306fGoogle Maps API\u306e\u8ab2\u91d1\u4f53\u5236\u304c\u5909\u66f4\u306b\u306a\u308a\u8cbb\u7528\u304c\u767a\u751f\u3059\u308b\u6050\u308c\u304c\u3042\u308b\u305f\u3081\u3001HP\u306e\u30a2\u30af\u30bb\u30b9<\/a>\u306b\u63b2\u8f09\u3059\u308b\u5468\u8fba\u5730\u56f3\u3092OpenStreetMap\u306b\u3067\u304d\u306a\u3044\u304b\u3068\u3044\u3046\u76f8\u8ac7\u304c\u5927\u5b66\u304b\u3089\u5f53\u4f1a\u306b\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n

OpenStreetMap\u3068\u3044\u3046\u306e\u306f\u5730\u56f3\u60c5\u5831\u3092\u8ab0\u3082\u304c\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u6709\u5fd7\u3067\u5354\u529b\u3057\u3066\u3001\u30d5\u30ea\u30fc\u306a\u5730\u56f3\u60c5\u5831\u30c7\u30fc\u30bf\u3092\u4f5c\u308d\u3046\u3068\u3044\u3046\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3059\u3002Wikipedia\u306e\u5730\u56f3\u7248\u307f\u305f\u3044\u306a\u3082\u306e\u3067\u3059\u3002<\/p>\n

OpenStreetMap(OSM)\u306e\u5730\u56f3\u3092\u30b5\u30a4\u30c8\u306b\u8f09\u305b\u3088\u3046\u3068\u601d\u3048\u3070\u7c21\u5358\u3067\u3059\u304c\u3001\u56fd\u4fe1\u5927\u306e\u5834\u5408\uff12\u3064\u554f\u984c\u70b9\u304c\u3042\u308a\u307e\u3059\u3002
\n\u4e00\u3064\u306f\u5927\u5b66\u306e\u30da\u30fc\u30b8\u3067\u3059\u304b\u3089\u8a71\u984c\u306b\u306a\u308c\u3070\u30a2\u30af\u30bb\u30b9\u304c\u5897\u52a0\u3057\u3001OSM\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u8ca0\u8377\u304c\u304b\u304b\u3063\u3066\u3057\u307e\u3046\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002
\n\u3082\u3046\u4e00\u3064\u306fOSM\u306e\u5730\u56f3\u306f\u6709\u5fd7\u306e\u624b\u306b\u3088\u3063\u3066\u4f5c\u3089\u308c\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u56fd\u4fe1\u5927\u306f\u7530\u820e\u306e\u79c1\u7acb\u5927\u5b66\u306e\u305f\u3081\u77e5\u540d\u5ea6\u304c\u306a\u304fOSM\u306b\u306f\u63b2\u8f09\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002OSM\u306f\u6709\u5fd7\u304c\u7de8\u96c6\u306b\u53c2\u52a0\u3067\u304d\u308b\u305f\u3081\u3001\u56fd\u4fe1\u5927\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001\u4eca\u307e\u3067\u7121\u540d\u3067\u3042\u3063\u305f\u4e0a\u306b\u67d0\u533f\u540d\u63b2\u793a\u677f\u306e\u30e6\u30fc\u30b6\u30fc\u9054\u306e
\u30a4\u30bf\u30ba\u30e9<\/a>\u306b\u3088\u308a\u67b6\u7a7a\u306e\u5927\u5b66\u3067\u3042\u308b\u3068\u3044\u3046\u60c5\u5831\u304c\u30cd\u30c3\u30c8\u306b\u6d41\u5e03\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u305d\u306e\u305f\u3081\u3001\u67b6\u7a7a\u306e\u5927\u5b66\u3067\u3042\u308b\u3068\u601d\u3044\u3053\u3080\u4eba\u304c\u591a\u304f\u3001OSM\u306b\u8ffd\u52a0\u3057\u305f\u3068\u3053\u308d\u3067\u300c\u67b6\u7a7a\u306e\u5730\u7269\u304c\u8ffd\u52a0\u3055\u308c\u3066\u308b\uff01\u3053\u308c\u306fOSM\u306b\u5bfe\u3059\u308b\u7834\u58ca\u884c\u70ba\u3060\uff01\u300d\u3068\u304b\u601d\u308f\u308c\u3066\u5373\u6d88\u3057\u3055\u308c\u305d\u3046\u306a\u306e\u3067\u3084\u3081\u3066\u304a\u304d\u307e\u3059\u3002
\n(OSM\u306f\u7d20\u6674\u3089\u3057\u3044\u53d6\u308a\u7d44\u307f\u3067\u3042\u308a\u3001\u5730\u4e0a\u306b\u5b58\u5728\u3059\u308b\u3082\u306e\u3092\u30de\u30c3\u30d4\u30f3\u30b0\u3059\u308b\u306a\u3069\u306e
\u6c7a\u307e\u308a<\/a>\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u5c0a\u91cd\u3057\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002)<\/p>\n

\u305d\u3053\u3067\u3001\u5927\u5b66\u306e\u65b9\u3067\u81ea\u524d\u306e\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc(\u5730\u56f3\u753b\u50cf\u3092\u914d\u4fe1\u3059\u308b\u30b5\u30fc\u30d0\u30fc)\u3092\u7528\u610f\u3057\u3001\u305d\u3053\u306bOSM\u306e\u30c7\u30fc\u30bf\u306b\u4fee\u6b63\u3092\u52a0\u3048\u305f\u3082\u306e\u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u69cb\u7bc9\u65b9\u6cd5\u306f\u8abf\u3079\u308c\u3070\u3044\u308d\u3044\u308d\u51fa\u3066\u304f\u308b\u306e\u3067\u3059\u304c\u3001\u5730\u56f3\u30c7\u30fc\u30bf\u306e\u7de8\u96c6\u306b\u3064\u3044\u3066\u306fOSM\u672c\u5bb6\u306b\u8ca2\u732e\u3059\u308b\u3053\u3068\u304c\u524d\u63d0\u3068\u306a\u3063\u3066\u3044\u3066OSM\u306e\u30c7\u30fc\u30bf\u306b\u30ed\u30fc\u30ab\u30eb\u3067<\/strong>\u72ec\u81ea\u3067\u5730\u7269(\u5730\u56f3\u4e0a\u306e\u7269\u3084\u6982\u5ff5)\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u306e\u60c5\u5831\u304c\u3042\u307e\u308a\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u8a66\u884c\u932f\u8aa4\u306e\u4e0a\u3001\u5834\u5f53\u305f\u308a\u7684\u306a\u6ce5\u81ed\u3044\u65b9\u6cd5\u3067\u3059\u304cOSM\u306e\u30c7\u30fc\u30bf\u3092\u30ed\u30fc\u30ab\u30eb\u3067\u4fee\u6b63\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u306e\u3067\u307e\u3068\u3081\u3066\u304a\u304d\u307e\u3059\u3002\u3082\u3063\u3068\u9069\u5207\u306a\u65b9\u6cd5\u304c\u3042\u308c\u3070(\u591a\u5206\u3042\u308b\u306f\u305a)\u6559\u3048\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u3067\u3059\u3002<\/p>\n

\u5fc5\u8981\u306a\u30c4\u30fc\u30eb\u306fosmosis\u3068osmconvert\u3068JOSM\u3067\u3059\u3002\u50d5\u306fArch Linux\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u304cJOSM\u306fpacman\u304b\u3089\u5165\u308a\u3001osmosis\u3068osmconvert\u306fAUR\u304b\u3089\u5165\u308c\u307e\u3057\u305f\u3002<\/p>\n

\u307e\u305a\u3001OSM\u306e\u30c7\u30fc\u30bf\u3092\u5165\u624b\u3057\u307e\u3059\u3002\u5730\u7403\u4e0a\u306e\u5168\u3066\u3092\u7db2\u7f85\u3057\u305fplanet.osm\u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u5727\u7e2e\u3057\u3066\u308230-50GB\u3068\u3044\u3046\u4ee3\u7269\u3067\u3059\u3057\u3088\u307b\u3069\u306e\u9ad8\u30b9\u30da\u30c3\u30af\u30de\u30b7\u30f3\u3067\u306a\u3044\u3068\u6271\u3048\u306a\u3044\u3067\u3057\u3087\u3046\u3002\u3053\u3053\u3067\u306f\u4e2d\u90e8\u5730\u65b9\u3060\u3051\u306e\u30c7\u30fc\u30bf\u3092\u5165\u624b\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002geofabrik<\/a>\u306e\u30b5\u30a4\u30c8\u304b\u3089\u5165\u624b\u3067\u304d\u307e\u3059\u3002PBF\u5f62\u5f0f\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u304c\u4e2d\u90e8\u3060\u3051\u3067\u3082249MB\u3082\u3042\u308a\u307e\u3059\u306d\u30fb\u30fb\u30fb
\n(OSM\u30c7\u30fc\u30bf\u306e\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u306b\u306f\u8907\u6570\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u306f.osm\u3068.pbf\u3092\u4f7f\u3044\u307e\u3059\u3002.osm\u306fXML\u5f62\u5f0f\u3067\u53d6\u308a\u56de\u3057\u304c\u3088\u304f\u7de8\u96c6\u6642\u306b\u4f7f\u3044\u307e\u3059\u3002.pbf\u306f\u30d0\u30a4\u30ca\u30ea\u5f62\u5f0f\u3067\u30b3\u30f3\u30d1\u30af\u30c8\u306a\u306e\u3067\u5e83\u57df\u5411\u3051\u3067\u3059\u3002)<\/p>\n

\u3053\u308c\u3067\u3082\u5c11\u3057\u5927\u304d\u3044\u306e\u3067\u9577\u91ce\u770c\u3092\u56f2\u3080\u77e9\u5f62\u9818\u57df\u3060\u3051\u5207\u308a\u51fa\u3057\u307e\u3057\u3087\u3046\u3002PBF\u30d5\u30a1\u30a4\u30eb\u3084OSM\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u63db\u3057\u305f\u308a\u3059\u308b\u306e\u306bosmosis\u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002top,left,bottom,right\u3092\u7def\u5ea6\u7d4c\u5ea6\u3067\u6307\u5b9a\u3057\u3001\u5207\u308a\u51fa\u3057\u305f\u9818\u57df\u3092nagano-rect.pbf\u306b\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002<\/p>\n

$ osmosis –rb chubu-latest.osm.pbf –bounding-box top=37.05 left=137.255 bottom=35.15 right=138.85 completeWays=yes completeRelations=yes –wb nagano-rect.pbf<\/p>\n

\u3053\u308c\u3067\u9577\u91ce\u770c\u3092\u56f2\u3080\u7bc4\u56f2\u306e\u30c7\u30fc\u30bf\u306b\u306a\u308a\u307e\u3057\u305f\u306e\u3067\u3001\u5730\u7269\u3092\u8ffd\u52a0\u4fee\u6b63\u3057\u3066\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306b\u7a81\u3063\u8fbc\u307f\u307e\u3059\u3002\u8ffd\u52a0\u4fee\u6b63\u3057\u305f\u3044\u306e\u3067\u3059\u304c\u3001\u76f4\u63a5\u7de8\u96c6\u3059\u308b\u306b\u306f\u307e\u3060\u5de8\u5927\u306a\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002\u7de8\u96c6\u7528\u306b\u30ad\u30e3\u30f3\u30d1\u30b9\u306e\u5468\u8fba\u3060\u3051.osm\u30d5\u30a1\u30a4\u30eb\u306b\u5207\u308a\u51fa\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n

$\u00a0osmosis –rb nagano-rect.pbf –bounding-box top=36.4 left=137.8317 bottom=36.366 right=137.89 –wx campus-around.osm<\/p>\n

\u5f8c\u3067\u5dee\u5206\u3092\u53d6\u308b\u305f\u3081\u3001\u30b3\u30d4\u30fc\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n

$ cp campus-around.osm camps-around-orig.osm<\/p>\n

\u30aa\u30ea\u30b8\u30ca\u30eb\u3092\u30b3\u30d4\u30fc\u3057\u305f\u3089\u65e9\u901f\u7de8\u96c6\u3057\u307e\u3059\u3002JOSM\u3063\u3066\u3044\u3046java\u3067\u3067\u304d\u305fOSM\u7528\u306e\u30a8\u30c7\u30a3\u30bf\u30fc\u304c\u3042\u308b\u306e\u3067\u5148\u307b\u3069\u306ecampus-around.osm\u3092\u958b\u3044\u3066\u5730\u7269\u3092\u8ffd\u52a0\u4fee\u6b63\u524a\u9664\u3057\u3066\u3044\u304d\u307e\u3059\u3002iD\u3063\u3066\u3044\u3046\u624b\u8efd\u306a\u30a8\u30c7\u30a3\u30bf\u304c\u3042\u308b\u3089\u3057\u3044\u3051\u3069\u30ed\u30fc\u30ab\u30eb\u3067\u4fee\u6b63\u3059\u308b\u306e\u306b\u306f\u4f7f\u3048\u306a\u3044\u304b\u3082\u3002<\/p>\n

\u3046\u3061\u306e\u5927\u5b66\u306f\u7530\u820e\u306e\u79c1\u5927\u306e\u304f\u305b\u306bTDL\u4e26\u306b\u30ad\u30e3\u30f3\u30d1\u30b9\u304c\u5927\u304d\u304f\u3001\u5efa\u7269\u3082\u591a\u3044\u306e\u3067\u30ce\u30fc\u30c9\u7e4b\u3044\u3067\u540d\u524d\u3064\u3051\u3066\u30bf\u30b0\u4ed8\u3051\u3057\u3066\u8907\u96d1\u306a\u5730\u7269\u306f\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u8a2d\u5b9a\u3057\u3066\u30fb\u30fb\u30fb\u6b63\u76f4\u3081\u3093\u3069\u304f\u3055\u3044\u3067\u3059\u3002OSM\u306e\u8ca2\u732e\u8005\u306e\u7686\u69d8\u306b\u306f\u982d\u304c\u4e0b\u304c\u308a\u307e\u3059\u3002(\u3067\u3082\u306a\u308c\u308b\u3068\u697d\u3057\u3044\uff01\uff1f)<\/p>\n

\"\"<\/p>\n

\u7de8\u96c6\u304c\u5b8c\u4e86\u3057\u305f\u3089\u4fdd\u5b58\u3057JOSM\u3092\u9589\u3058\u307e\u3059\u3002\u9589\u3058\u308b\u6642\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u304b\u805e\u304b\u308c\u307e\u3059\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u305b\u305a\u4fdd\u5b58\u3059\u308b\u3060\u3051\u306b\u3057\u307e\u3059\u3002\u65e9\u901fOSM\u306e\u5dee\u5206\u3092\u53d6\u308a\u305f\u3044\u306e\u3067\u3059\u304c\u4e00\u7b4b\u7e04\u306b\u306f\u3044\u304d\u307e\u305b\u3093\u3002\u6ce5\u81ed\u3044\u3084\u308a\u65b9\u3067\u5f37\u884c\u7a81\u7834\u3057\u307e\u3059\u3002<\/p>\n

\u307e\u305a\u3001\u7de8\u96c6\u5f8c\u306eOSM\u30d5\u30a1\u30a4\u30eb\u3092\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u958b\u304d\u307e\u3059\u3002XML\u304c\u898b\u3048\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u65b0\u3057\u304f\u8ffd\u52a0\u3057\u305f\u30ce\u30fc\u30c9\u7b49\u306fid\u5c5e\u6027\u304c\u8ca0\u6570\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u8ca0\u6570\u306eID\u306f\u4eee\u306e\u3082\u306e\u3067OSM\u672c\u5bb6\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3068\u6b63\u6570\u306e\u56fa\u6709\u306eID\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u308b\u305d\u3046\u3067\u3059\u304c\u3001\u3053\u3053\u3067\u306f\u30ed\u30fc\u30ab\u30eb\u3067\u6e08\u307e\u305b\u305f\u3044\u306e\u3067\u8ca0\u8a18\u53f7\u3068\u4e0a\u3072\u3068\u6841\u3092\u4ed6\u3068\u91cd\u8907\u3057\u306a\u3055\u305d\u3046\u306a\u9069\u5f53\u306a\u6570\u5b57\u5217\u306b\u7f6e\u63db\u3057\u3066\u304a\u8336\u304a\u6fc1\u3057\u307e\u3057\u3087\u3046\u3002ID\u7f6e\u63db\u5f8c\u3067\u3082\u65e2\u5b58\u306eID\u3088\u308a\u82e5\u304f\u306a\u308b\u3088\u3046\u306a\u6570\u5b57\u5217\u3067\u7f6e\u63db\u3059\u308b\u3068\u5f8c\u3067\u30a8\u30e9\u30fc\u306b\u306a\u3089\u305a\u306b\u3059\u307f\u307e\u3059\u3002<\/p>\n

\"\"<\/p>\n

osmosis\u3092\u4f7f\u3063\u3066\u5909\u63db\u3057\u3088\u3046\u3068\u601d\u3048\u3070timestamp,changeset,version\u5c5e\u6027\u3082\u5fc5\u8981\u3067\u3059\u3002JOSM\u3067\u8ffd\u52a0\u3057\u305f\u30ce\u30fc\u30c9\u7b49\u306b\u306f3\u5c5e\u6027\u304c\u3064\u3044\u3066\u304a\u3089\u305a\u3001action=’modify’\u5c5e\u6027\u304c\u3064\u3044\u3066\u3044\u307e\u3059\u306e\u3067\u305d\u308c\u3092\u7f6e\u63db\u5bfe\u8c61\u306b\u3046\u307e\u304f\u4f7f\u3063\u30663\u5c5e\u6027\u3092\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046\u3002\u3053\u3053\u3067\u306f\u300c’ action=’modify’ lat=’\u300d\u3092\u300c’ action=’modify’ timestamp=’2018-06-01T00:00:00Z’ version=’1′ changeset=’1′ lat=’\u300d\u306b\u7f6e\u63db\u3057\u307e\u3057\u305f\u3002<\/p>\n

\"\"<\/p>\n

node\u3060\u3051\u3067\u306a\u304fway\u3084relation\u306b\u3082\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u300c’ action=’modify’>\u300d\u3092\u300c’ action=’modify’ timestamp=’2018-06-01T00:00:00Z’ version=’1′ changeset=’1′>\u300d\u306b\u7f6e\u63db\u3057\u307e\u3057\u305f\u3002<\/p>\n

\"\"<\/p>\n

\u6b21\u306bosmosis\u304c\u6b63\u5e38\u306b\u3053\u306e.osm\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3093\u3067\u304f\u308c\u308b\u304b\u78ba\u304b\u3081\u307e\u3059\u3002osmosis\u3067\u7121\u610f\u5473\u306a\u5909\u63db\u3092\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n

$ osmosis –rx\u00a0campus-around.osm –wx campus-around-test.osm<\/p>\n

\u3053\u308c\u3067\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u3089\u5148\u307b\u3069\u306e\u7f6e\u63db\u3092\u898b\u76f4\u3059\u306a\u3069\u3057\u3066\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8(\u5c5e\u6027\u304c\u8db3\u308a\u306a\u3044\u7b49)\u306b\u5bfe\u5fdc\u3057\u307e\u3059\u3002\u4f55\u3082\u30a8\u30e9\u30fc\u304c\u51fa\u306a\u304b\u3063\u305f\u3089\u6b21\u306b\u9032\u307f\u307e\u3059\u3002osmconvert\u3092\u901a\u3057\u307e\u3059\u3002<\/p>\n

$\u00a0osmconvert campus-around.osm –emulate-osmosis -o=campus-around-converted.osm<\/p>\n

\u3053\u308c\u3092\u3057\u306a\u3044\u3068JOSM\u3067\u524a\u9664\u3057\u305f\u30ce\u30fc\u30c9\u7b49\u304c\u751f\u304d\u8fd4\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002(osmosis\u304caction=”delete”\u3092\u30b9\u30eb\u30fc\u3057\u3066\u3057\u307e\u3046\u305f\u3081)<\/p>\n

\u3084\u3063\u3068osm\u306e\u5dee\u5206\u3092\u53d6\u308b\u6bb5\u968e\u306b\u305f\u3069\u308a\u7740\u304d\u307e\u3057\u305f\u3002osmosis\u30b3\u30de\u30f3\u30c9\u3067.osm\u30d5\u30a1\u30a4\u30eb\u306e\u5dee\u5206\u3092\u3068\u3063\u3066.osc\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002–rx\u3067.osm\u30d5\u30a1\u30a4\u30eb\u3092\uff12\u3064\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u7de8\u96c6\u5f8c\u304c\u524d\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u304c\u5f8c\u308d\u3067\u3059\u3002<\/p>\n

$\u00a0osmosis –rx campus-around-converted.osm –rx\u00a0camps-around-orig.osm –derive-change –write-xml-change file=”campus-around-change.osc”<\/p>\n

\u3064\u3044\u306b\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306b\u7a81\u3063\u8fbc\u3080\u30c7\u30fc\u30bf\u306b\u5dee\u5206\u3092\u9069\u5fdc\u3059\u308b\u6bb5\u968e\u306b\u6765\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u524d\u534a\u3067\u7528\u610f\u3057\u305fnagano-rect.pbf\u306b\u9069\u5fdc\u3057\u3066\u307f\u307e\u3059\u3002\u3082\u3061\u308d\u3093\u4e2d\u90e8\u5168\u57df\u306ePBF\u30d5\u30a1\u30a4\u30eb\u3067\u3082\u65e5\u672c\u5168\u57df\u3067\u3082\u5168\u4e16\u754c\u306eplanet.osm\u3067\u3082\u304b\u307e\u3044\u307e\u305b\u3093\u3002<\/p>\n

$\u00a0osmosis –read-xml-change file=”campus-around-change.osc” –rb nagano-rect.pbf –apply-change –wb nagano-rect-modified.pbf<\/p>\n

\u3053\u308c\u3067\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306epostgres\u306b\u7a81\u3063\u8fbc\u3080\u30c7\u30fc\u30bf\u304c\u51fa\u6765\u4e0a\u304c\u308a\u307e\u3057\u305f\uff01\uff01\uff01\u9577\u304b\u3063\u305f\uff01\uff01\uff01\uff01<\/p>\n

\u3042\u3068\u306fOSM\u306e\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u69cb\u7bc9\u65b9\u6cd5\u306f\u30b0\u30b0\u308c\u3070\u3044\u308d\u3044\u308d\u51fa\u3066\u304f\u308b\u306e\u3067\u69cb\u7bc9\u3057\u3066\u3001osm2pgsql\u3067\u5148\u7a0b\u306enagano-rect-modified.pbf\u3092\u7a81\u3063\u8fbc\u3093\u3067\u3042\u3052\u308c\u3070OK\u3067\u3059\u3002<\/p>\n

\u3053\u308c\u3067\u3081\u3067\u305f\u304f\u72ec\u81ea\u8ffd\u52a0\u3057\u305f\u5730\u7269\u304c\u8868\u793a\u3055\u308c\u308b\u81ea\u5206\u305f\u3061\u3060\u3051\u306e\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u304c\u51fa\u6765\u4e0a\u304c\u308a\u307e\u3059\u3002\u3084\u3063\u305f\u306d\uff01\uff01<\/p>\n

\u3061\u306a\u307f\u306b\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u69cb\u7bc9\u306f\u30b0\u30b0\u308c\u3070OK\u3063\u3066\u8a00\u3044\u307e\u3057\u305f\u304c\u3001\u3053\u3063\u3061\u306e\u65b9\u3067\u3082\u305f\u304f\u3055\u3093\u82e6\u52b4\u304c\u3042\u308a\u307e\u3057\u305f\u30fb\u30fb\u30fb\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u69cb\u7bc9\u307e\u3067\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u3068\u306f\u30fb\u30fb\u30fb\u307e\u3042\u666e\u901a\u306b\u751f\u304d\u3066\u3066\u3059\u308b\u6a5f\u4f1a\u306a\u3093\u3066\u3042\u307e\u308a\u7121\u3044\u3067\u3059\u304b\u3089\u306d\u3002
\n\u3042\u3068\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306fApache+mod_tile\u304c\u9244\u677f\u306a\u306e\u3067\u3059\u304c\u3001\u9244\u677f\u904e\u304e\u3066\u305d\u308c\u3092\u4f7f\u308f\u306a\u3044\u65b9\u6cd5\u306e\u60c5\u5831\u304c\u306a\u304b\u306a\u304b\u51fa\u3066\u3053\u306a\u3044\u3093\u3067\u3059\u3088\u30fb\u30fb\u30fb
\nnginx\u3066\u69cb\u7bc9\u3057\u3088\u3046\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\u300c\u69cb\u7bc9\u3057\u305f\uff01\u300d\u3068\u306e\u60c5\u5831\u306f\u3042\u3063\u3066\u3082\u5177\u4f53\u7684\u306a\u6307\u5357\u304c\u898b\u5f53\u305f\u3089\u306a\u304b\u3063\u305f\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002<\/p>\n

\u3044\u308d\u3044\u308d\u8a66\u884c\u932f\u8aa4\u3057\u305f\u6319\u53e5postgres(postgis)+tirex(+mapnik)+lua-nginx-osm<\/a>\u3067\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u3092\u69cb\u7bc9\u3057\u307e\u3057\u305f\u3002lua-nginx-osm\u306f\u4eca\u56de\u306e\u6848\u4ef6\u306b\u3061\u3087\u3046\u3069\u3088\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001github\u4e0a\u306e\u30b3\u30fc\u30c9\u306f\u305d\u306e\u307e\u307e\u3067\u306f\u52d5\u304b\u305a\u5c11\u3057\u4fee\u6b63\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u4fee\u6b63\u7b87\u6240\u306f\u6700\u5f8c\u306b\u8f09\u305b\u3066\u304a\u3053\u3046\u304b\u306a\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n

\u5192\u982d\u306b\u3082\u66f8\u304d\u307e\u3057\u305f\u3068\u304a\u308a\u3046\u3061\u306e\u5927\u5b66\u306f\u6f64\u6ca2\u306a\u4e88\u7b97\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u4eca\u56de\u306e\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u3042\u3066\u304c\u308f\u308c\u305f\u30de\u30b7\u30f3\u3082\u8d05\u6ca2\u306a\u3082\u306e\u3067\u306f\u306a\u304f\u30e1\u30e2\u30ea\u30fc2GB\u3067CPU\u306f2\u30b3\u30a21.66GHz(Core2Duo T5500)\u30682018\u5e74\u3068\u306a\u3063\u3066\u306f\u63a7\u3048\u3081\u306a\u3082\u306e\u3067\u3059\u3002<\/p>\n

\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u3092\u69cb\u7bc9\u3057\u3066\u308f\u304b\u308a\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u3063\u3066\u60f3\u50cf\u4ee5\u4e0a\u306b\u8ca0\u8377\u304c\u304b\u304b\u308b\u3093\u3067\u3059\u306d\u30fb\u30fb\u30fb\u3053\u306e\u30de\u30b7\u30f3\u3067\u306f\u30bf\u30a4\u30eb\u306e\u63cf\u753b\u306b\u5341\u6570\u79d2\u301c\u6570\u5206\u3082\u304b\u304b\u3063\u3066\u3057\u307e\u3044\u3001\u63cf\u753b\u6027\u80fd\u7684\u306b\u306f\u4f7f\u3044\u3082\u306b\u306a\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3001\u4e00\u5ea6\u63cf\u753b\u3057\u305f\u3089tirex\u304c\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u3066\u3044\u307e\u3059\u3057\u3001cloudflare\u3082\u304b\u307e\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u30ad\u30e3\u30f3\u30d1\u30b9\u306e\u5468\u8fba\u3092\u8868\u793a\u3059\u308b\u3060\u3051\u306e\u7528\u9014\u306a\u3089\u4e00\u5fdc\u5927\u4e08\u592b\u3067\u3057\u3087\u3046\u3002<\/p>\n

\u98a8\u306e\u3046\u308f\u3055\u3067\u56fd\u4fe1\u5927\u306eHP\u306e\u30b5\u30fc\u30d0\u30fc\u306f\u3055\u304f\u3089VPS\u306e1G\u30d7\u30e9\u30f3\u3067\u904b\u7528\u3055\u308c\u3066\u3044\u308b\u3068\u304b\u805e\u3044\u3066\u3044\u3066\u3046\u3061\u306e\u5927\u5b66\u306f\u305d\u3093\u306a\u306b\u91d1\u304c\u306a\u3044\u306e\u304b\u30fb\u30fb\u30fb\u3068\u601d\u3063\u3066\u3044\u307e\u3057\u305f\u3002(\u86de\u8753\u4ead\u306e\u9a12\u304e\u3067\u56fd\u4fe1\u5927\u304c\u8a71\u984c\u306b\u306a\u3063\u305f\u3068\u304d\u306f\u30a2\u30af\u30bb\u30b9\u306e\u96c6\u4e2d\u3067\u3088\u304f\u9bd6\u843d\u3061\u3057\u3066\u3044\u307e\u3057\u305f\u3057)
\n\u9ad8\u30b9\u30da\u30c3\u30af\u306e\u8981\u6c42\u3055\u308c\u308b\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u3082\u307e\u3055\u304b1G\u306eVPS\u306b\u69cb\u7bc9\u3055\u305b\u3089\u308c\u308b\u306e\u3067\u306f\u306a\u3044\u304b\u5fc3\u914d\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u5927\u5b66\u5074\u304c(\u713c\u3051\u77f3\u306b\u6c34\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c)\u5c11\u3057\u30de\u30b7\u306a\u30de\u30b7\u30f3\u3092\u7528\u610f\u3057\u3066\u304f\u308c\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n

\u5927\u5b66HP\u306e\u30a2\u30af\u30bb\u30b9<\/a>\u30da\u30fc\u30b8\u306b\u63b2\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u4e00\u5fdc\u51fa\u6765\u4e0a\u304c\u3063\u305f\u5730\u56f3\u3092\u8cbc\u3063\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n