6: 2015-10-15 (木) 08:48:39 yuji ソース
Attached file: tags.xml, Deleted an attach file: tags.xml at 2015-10-15 (木) 16:48:20
7: 2015-10-19 (月) 03:14:53 yuji ソース
Attached file: Hokkaido.poly, Attached file: Honshu.poly, Attached file: Kyushu.poly, Deleted an attach file: Kyushu.poly at 2015-10-19 (月) 11:12:34, Deleted an attach file: Honshu.poly at 2015-10-19 (月) 11:12:48, Deleted an attach file: Hokkaido.poly at 2015-10-19 (月) 11:13:01, Attached file: hokkaido.poly, Attached file: honshu.poly, Attached file: kyushu.poly, Attached file: shikoku.poly, Deleted an attach file: tags.xml at 2015-11-27 (金) 16:51:58
Line 1: Line 1:
** Locus maps用の地図作成 [#veb1f176] ** Locus maps用の地図作成 [#veb1f176]
-[[Locus maps>https://play.google.com/store/apps/details?id=menion.android.locus.pro&hl=ja]]で使用できるベクター日本地図は,Locusアプリのストアからダウンロード出来るんだけど(ファイル3個まで無料),日本全体をカバーするには4個ダウンロードしないとダメなのと,実はLocusストアのベクター日本地図は,ところどころデータが破損していて,正常に地図が表示されない。このことを報告したら,Locusでは新しいベクター地図を用意しているんで,もう少し待ってくれと言っていた。+[[Locus maps>https://play.google.com/store/apps/details?id=menion.android.locus.pro&hl=ja]]で使用できるベクター日本地図は,Locusアプリのストアからダウンロード出来るんだけど(ファイル3個まで無料),日本全体をカバーするには4個ダウンロードしないとダメなのと,実はLocusストアのベクター日本地図は,ところどころデータが破損していて,正常に地図が表示されない。 :cry: ~ 
 +このことを報告したら,Locusでは新しいベクター地図を用意しているんで,もう少し待ってくれと言っていた。
-なんで,Locus mapで使用できるベクター日本地図を探すと,以下からダウンロードして使用できた。~+なので,Locus mapで使用できるベクター日本地図を探すと,以下からダウンロードして使用できた。~
[[Mapsforge Download Server>http://download.mapsforge.org/]]~ [[Mapsforge Download Server>http://download.mapsforge.org/]]~
OpenStreetMapから変換した日本全体のベクター地図がダウンロード出来て,Locusでもそのまま使用できる。~ OpenStreetMapから変換した日本全体のベクター地図がダウンロード出来て,Locusでもそのまま使用できる。~
-残念ながら,Mapsforgeの地図には等高線データは含まれていない。また更新頻度は1~2ヶ月ぐらいで最新とは限らない。+残念ながら,Mapsforgeの地図には等高線データは含まれていない。また更新頻度は1~2ヶ月ぐらいなので,常に最新とは限らない。
[[OpenAndroMaps>http://www.openandromaps.org/en/]]~ [[OpenAndroMaps>http://www.openandromaps.org/en/]]~
Line 20: Line 21:
.pbfファイルはバイナリデータに圧縮したファイルなんで,[[osmconvertツール>http://wiki.openstreetmap.org/wiki/Osmconvert]]を使ってosmfilterで編集出来るように.o5mファイルに変換する。 .pbfファイルはバイナリデータに圧縮したファイルなんで,[[osmconvertツール>http://wiki.openstreetmap.org/wiki/Osmconvert]]を使ってosmfilterで編集出来るように.o5mファイルに変換する。
- > osmconvert japan-latest.osm.pbf -B=..\poly\japan.poly -o=japan.o5m+ > osmconvert japan-latest.osm.pbf -B=..\poly\japan.poly -o=japan-latest.o5m
そして,いらないタグ(電線とか)を[[osmfilterツール>http://wiki.openstreetmap.org/wiki/Osmfilter]]を使って削除する。&ref(del.txt);にいらないタグを入れておく。 そして,いらないタグ(電線とか)を[[osmfilterツール>http://wiki.openstreetmap.org/wiki/Osmfilter]]を使って削除する。&ref(del.txt);にいらないタグを入れておく。
- > osmfilter japan.o5m --parameter-file=del.txt > japan_temp.o5m + > osmfilter japan-latest.o5m --parameter-file=del.txt > japan-latest_temp.o5m 
- > rm japan.o5m+ > rm japan-latest.o5m
ところどころ,名前に(英語)のような表示が出る所があるんで,ついでにこれを削除しちゃう。~ ところどころ,名前に(英語)のような表示が出る所があるんで,ついでにこれを削除しちゃう。~
.osmに戻してperlを使って .osmに戻してperlを使って
- > osmconvert japan_temp.o5m -o=japan_temp.osm + > osmconvert japan-latest_temp.o5m -o=japan-latest_temp.osm 
- > perl -p -e 's/\(.+?\)//g;' japan_temp.osm > japan.osm + > perl -p -e 's/\(.+?\)//g;' japan-latest_temp.osm > japan.osm 
- > rm japan_temp.o5m + > rm japan-latest_temp.o5m 
- > rm japan_temp.osm+ > rm japan-latest_temp.osm
こんなようにして,(英語)を削除した。 こんなようにして,(英語)を削除した。
-これで,ベクター日本地図のjapan.osmが出来た。.osmファイルはテキストファイル(xml)で,日本全体だと20G以上になります。+これで,ベクター日本地図のjapan.osmが出来た。.osmファイルはテキストファイル(xml)で,日本全体だと22Gbyte以上になります。
日本地図データのjapan.osmからLocusストアのように4個に分割する場合は, 日本地図データのjapan.osmからLocusストアのように4個に分割する場合は,
Line 41: Line 42:
 > osmconvert japan.osm -B=..\poly\shikoku.poly -o=shikoku.osm  > osmconvert japan.osm -B=..\poly\shikoku.poly -o=shikoku.osm
 > osmconvert japan.osm -B=..\poly\kyushu.poly -o=kyushu.osm  > osmconvert japan.osm -B=..\poly\kyushu.poly -o=kyushu.osm
-のように,osmconvertツールで各polyファイルでエリアを指定して抽出すればOK。+のように,osmconvertツールで各polyファイルでエリアを指定して抽出すればOK。
 +このために各polyファイルを作成した。( &ref(hokkaido.poly); &ref(honshu.poly); &ref(shikoku.poly); &ref(kyushu.poly); )
*** SRTMのデータから等高線地図を作成 [#w49cf595] *** SRTMのデータから等高線地図を作成 [#w49cf595]
Line 53: Line 55:
ファイルフォーマットは,JPGIS(GML)ということだが・・・~ ファイルフォーマットは,JPGIS(GML)ということだが・・・~
- SRTM~ - SRTM~
-Shuttle Radar Topography Mission(SRTM)と呼ばれるスペースシャトルに積み込んだレーダを使って全世界の詳細な立体地形データを作成すること目的としたミッションがあって,その成果が利用できるみたい。+[[Shuttle Radar Topography Mission(SRTM)>http://www2.jpl.nasa.gov/srtm/]]と呼ばれるスペースシャトルに積み込んだレーダを使って全世界の詳細な立体地形データを作成すること目的としたミッションがあって,その成果が利用できるみたい。
-[[SRTM3 Version3>http://e4ftl01.cr.usgs.gov/SRTM/SRTMGL3.003/2000.02.11/]]+[[SRTM3 Version3>http://e4ftl01.cr.usgs.gov/SRTM/SRTMGL3.003/2000.02.11/]]からデータ(.hgt.zip)をダウンロード出来る。SRTM1 Version 3はUSAのみなので,日本の地形の場合は,SRTM3 Version 3になるんだと思う。実際の地形データは,緯度経度で区切られた区画ごとにファイルになっている。
-ここからデータ(.hgt.zip)をダウンロード出来る。~+
SRTMのデータからOpenStreetMapのフォーマットに変換してくれる以下のようなツールがあるみたいなんで,それを使用して等高線地図を作ってみた。(国土地理院のデータの方が正確らしいが・・・) SRTMのデータからOpenStreetMapのフォーマットに変換してくれる以下のようなツールがあるみたいなんで,それを使用して等高線地図を作ってみた。(国土地理院のデータの方が正確らしいが・・・)
Line 77: Line 78:
srtm2osmでダウンロードした.hgtファイルのデータは大丈夫みたいなので(つまり http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia/ にあるデータはダメで,http://e4ftl01.cr.usgs.gov/SRTM/SRTMGL3.003/2000.02.11/ のだと大丈夫ってこと。) ,srtm2osmでダウンロードした.hgtファイルに入れ替えて,再度phyghtmapを使って.osmファイルを作成した。~ srtm2osmでダウンロードした.hgtファイルのデータは大丈夫みたいなので(つまり http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia/ にあるデータはダメで,http://e4ftl01.cr.usgs.gov/SRTM/SRTMGL3.003/2000.02.11/ のだと大丈夫ってこと。) ,srtm2osmでダウンロードした.hgtファイルに入れ替えて,再度phyghtmapを使って.osmファイルを作成した。~
これでやっと,日本の等高線データのjapan_srtm.osmが作成できた。 これでやっと,日本の等高線データのjapan_srtm.osmが作成できた。
 +
 +また,日本の等高線データjapan_srtm.osmも地図データと同様に,4個に分割するのも同じようにすれば作成できる。(phyghtmapで,直接作成することも出来るが,こっちのやり方のほうが早い。)
 + > osmconvert japan_srtm.osm -B=..\poly\hokkaido.poly -o=hokkaido_srtm.osm
 + > osmconvert japan_srtm_.osm -B=..\poly\honshu.poly -o=honsyu_srtm.osm
 + > osmconvert japan_srtm.osm -B=..\poly\shikoku.poly -o=shikoku_srtm.osm
 + > osmconvert japan_srtm.osm -B=..\poly\kyushu.poly -o=kyushu_srtm.osm
 +一度作成しておけば,後は地図と等高線をマージすれば4個の等高線入り日本地図データが作れます。
ちなみに,ダウンロードした.hgtファイルをLocus/data/srtm/ フォルダーに入れておいて,Locus mapで地形を表示する設定にすると,起伏なんかが明暗表示されて見やすくなります。 ちなみに,ダウンロードした.hgtファイルをLocus/data/srtm/ フォルダーに入れておいて,Locus mapで地形を表示する設定にすると,起伏なんかが明暗表示されて見やすくなります。
Line 86: Line 94:
osmosisはjavaアプリケーションですが,日本全体を処理する場合はRAMがたくさんあるPC出ないと,そのままではメモリ不足で停止しちゃいます。(5Gを割り当てても足りない)~ osmosisはjavaアプリケーションですが,日本全体を処理する場合はRAMがたくさんあるPC出ないと,そのままではメモリ不足で停止しちゃいます。(5Gを割り当てても足りない)~
type=hdを使うと速度はかなり遅くなりますが,メモリ不足はなんとか回避できます。tag-conf-file=&ref(tags.xml);で表示用にタグ設定しておきます。(設定がおかしいかも・・・) type=hdを使うと速度はかなり遅くなりますが,メモリ不足はなんとか回避できます。tag-conf-file=&ref(tags.xml);で表示用にタグ設定しておきます。(設定がおかしいかも・・・)
- > osmosis --read-xml file="japan_osm" --sort -- read-xml file="japan_strm.osm" --sort --merge --mapfile-writer file="japan.map" type=hd tag-conf-file=tags\tags.xml zoom-interval-conf=10,9,11,14,12,21 map-start-zoom=10 + > osmosis --read-xml file="japan_osm" --sort --read-xml file="japan_strm.osm" --sort --merge --mapfile-writer file="japan.map" type=hd tag-conf-file=tags.xml zoom-interval-conf=10,9,11,14,12,21 map-start-zoom=10
-とにかく時間がかかります。マージするだけでも大体27時間ぐらいかかった :-o+とにかく時間がかかります。マージするだけでも大体27時間(sortしないと15時間)ぐらいかかった :-o
こうやって出来た日本のベクターマップjapan.mapを,Locus/mapsVector/japanフォルダーにコピーして,Locusで使用することが出来た。~ こうやって出来た日本のベクターマップjapan.mapを,Locus/mapsVector/japanフォルダーにコピーして,Locusで使用することが出来た。~
&ref(japan_map.png);&ref(japan_map2.png); &ref(japan_map.png);&ref(japan_map2.png);
 +同様にして,Locusストアで提供されているように,北海道,本州,四国,九州の4個の.mapファイルを作成した。
 + > osmosis --read-xml file="hokkaido.osm" --sort --read-xml file="hokkaido_srtm.osm" --sort --merge --mapfile-writer file="hokkaido.map" type=hd tag-conf-file=tags.xml map-start-zoom=10 comment="%date% made by Yuji Ueno"
 + > osmosis --read-xml file="honshu.osm" --sort --read-xml file="honshu_srtm.osm" --sort --merge --mapfile-writer file="honshu.map" type=hd tag-conf-file=tags.xml map-start-zoom=10 comment="%date% made by Yuji Ueno"
 + > osmosis --read-xml file="shikoku.osm" --sort --read-xml file="shikoku_srtm.osm" --sort --merge --mapfile-writer file="shikoku.map" type=hd tag-conf-file=tags.xml map-start-zoom=10 comment="%date% made by Yuji Ueno"
 + > osmosis --read-xml file="kyushu.osm" --sort --read-xml file="kyushu_srtm.osm" --sort --merge --mapfile-writer file="kyushu.map" type=hd tag-conf-file=tags.xml map-start-zoom=10 comment="%date% made by Yuji Ueno"
// 作成した日本のベクターマップは,[[こちら(2015/10/06時点)>https://onedrive.live.com/redir?resid=9D5AE460143634BB%21936]] // 作成した日本のベクターマップは,[[こちら(2015/10/06時点)>https://onedrive.live.com/redir?resid=9D5AE460143634BB%21936]]

  • PC/地図/Locus map用ベクター地図 のバックアップ一覧
  • PC/地図/Locus map用ベクター地図 のバックアップ差分(No. All)
    • 1: 2015-10-05 (月) 03:52:54 yuji
    • 2: 2015-10-13 (火) 01:12:03 yuji
      • Attached file: del.txt, Attached file: japan.poly, Attached file: japan_map.png
    • 3: 2015-10-13 (火) 05:20:08 yuji
      • Attached file: tags.xml, Attached file: japan_map2.png, Deleted an attach file: del.txt at 2015-10-14 (水) 13:04:46
    • 4: 2015-10-14 (水) 05:05:04 yuji
      • Attached file: del.txt, Deleted an attach file: del.txt at 2015-10-15 (木) 08:33:16
    • 5: 2015-10-15 (木) 02:35:43 yuji
      • Attached file: del.txt, Deleted an attach file: del.txt at 2015-10-15 (木) 10:33:42 at 2015-10-15 (木) 10:35:13, Deleted an attach file: tags.xml at 2015-10-15 (木) 14:54:36
    • 6: 2015-10-15 (木) 08:48:39 yuji
      • Attached file: tags.xml, Deleted an attach file: tags.xml at 2015-10-15 (木) 16:48:20
    • 7: 2015-10-19 (月) 03:14:53 yuji
      • Attached file: Hokkaido.poly, Attached file: Honshu.poly, Attached file: Kyushu.poly, Deleted an attach file: Kyushu.poly at 2015-10-19 (月) 11:12:34, Deleted an attach file: Honshu.poly at 2015-10-19 (月) 11:12:48, Deleted an attach file: Hokkaido.poly at 2015-10-19 (月) 11:13:01, Attached file: hokkaido.poly, Attached file: honshu.poly, Attached file: kyushu.poly, Attached file: shikoku.poly, Deleted an attach file: tags.xml at 2015-11-27 (金) 16:51:58
    • 8: 2015-11-27 (金) 07:52:27 yuji
      • Attached file: tags.xml
    • 9: 2016-02-10 (水) 12:50:41 yuji
      • Attached file: Tohoku.poly, Attached file: Kanto.poly, Attached file: Chubu.poly, Attached file: Kinki.poly, Attached file: Chugoku.poly, Attached file: Hokkaido.poly, Attached file: Shikoku.poly, Attached file: Kyushu.poly, Deleted an attach file: shikoku.poly at 2016-02-10 (水) 21:51:25, Deleted an attach file: kyushu.poly at 2016-02-10 (水) 21:51:52, Deleted an attach file: hokkaido.poly at 2016-02-10 (水) 21:52:09
    • 10: 2016-05-19 (木) 04:55:48 yuji
      • Attached file: shape2osm.py
    • 11: 2016-05-23 (月) 01:16:36 yuji
      • Attached file: hokkaido_s.osm, Attached file: tohoku_s.osm, Attached file: kanto_s.osm, Attached file: chubu_s.osm, Attached file: kinki_s.osm, Attached file: chugoku_s.osm, Attached file: shikoku_s.osm, Attached file: kyushu_s.osm
    • 12: 2016-05-26 (木) 08:00:42 yuji
      • Attached file: tags_0.xml, Deleted an attach file: tags.xml at 2016-05-26 (木) 16:00:29, Attached file: tags.xml
    • 13: 2020-12-26 (土) 15:07:38 yuji
      • Attached file: honshu_s.osm, Attached file: Honshu.poly, Deleted an attach file: tags_0.xml at 2022-03-11 (金) 11:32:49, Deleted an attach file: tags.xml at 2022-03-11 (金) 11:32:53, Deleted an attach file: honshu_s.osm at 2022-03-11 (金) 11:44:19, Deleted an attach file: tohoku_s.osm at 2022-03-11 (金) 11:44:29, Deleted an attach file: kanto_s.osm at 2022-03-11 (金) 11:44:38, Deleted an attach file: chubu_s.osm at 2022-03-11 (金) 11:44:48, Deleted an attach file: kinki_s.osm at 2022-03-11 (金) 11:44:56, Deleted an attach file: kyushu_s.osm at 2022-03-11 (金) 11:45:05, Deleted an attach file: shikoku_s.osm at 2022-03-11 (金) 11:45:14, Deleted an attach file: chugoku_s.osm at 2022-03-11 (金) 11:45:25, Deleted an attach file: hokkaido_s.osm at 2022-03-11 (金) 11:45:35, Deleted an attach file: honshu_s_0.osm at 2022-03-11 (金) 11:50:23, Deleted an attach file: shape2osm.py at 2022-03-11 (金) 12:02:26 at 2022-03-18 (金) 07:51:26 at 2022-03-18 (金) 15:37:00 at 2022-03-22 (火) 13:24:43, Deleted an attach file: yuji_theme.zip at 2022-03-22 (火) 16:37:46, Deleted an attach file: yuji.zip at 2022-03-24 (木) 09:37:21 at 2022-03-24 (木) 10:34:56 at 2022-03-24 (木) 17:47:31 at 2022-03-24 (木) 18:16:43 at 2022-03-24 (木) 22:04:07 at 2022-03-25 (金) 15:51:22 at 2022-03-25 (金) 16:06:18 at 2022-03-25 (金) 16:14:48 at 2022-03-25 (金) 16:23:33 at 2022-03-25 (金) 16:40:05, Deleted an attach file: poi-mapping.xml at 2022-03-26 (土) 17:16:56
    • 現: 2022-03-28 (月) 22:52:43 yuji
      • Deleted an attach file: yuji.zip at 2022-04-05 (火) 17:57:26 at 2022-04-13 (水) 14:13:11 at 2022-04-13 (水) 14:42:40 at 2022-04-13 (水) 17:12:40 at 2022-04-14 (木) 10:42:26 at 2022-04-14 (木) 16:37:52 at 2022-04-14 (木) 17:12:03 at 2022-04-14 (木) 17:23:52 at 2022-04-15 (金) 09:09:56 at 2022-04-15 (金) 09:58:18, Deleted an attach file: tags.xml at 2022-04-15 (金) 16:13:22 at 2022-04-16 (土) 07:03:27 at 2022-04-17 (日) 09:45:09 at 2022-04-18 (月) 21:44:02 at 2022-04-19 (火) 13:00:54 at 2022-04-20 (水) 09:13:15 at 2022-04-21 (木) 10:48:22 at 2022-04-21 (木) 16:19:59 at 2022-04-21 (木) 16:47:32, Deleted an attach file: poi-mapping.xml at 2022-04-22 (金) 11:05:32 at 2022-04-29 (金) 16:23:58 at 2022-04-29 (金) 16:24:41 at 2022-04-29 (金) 16:41:09, Deleted an attach file: tagfilter.txt at 2022-04-29 (金) 17:20:13 at 2022-04-29 (金) 17:58:47 at 2022-04-29 (金) 18:15:10 at 2023-06-28 (水) 10:21:51 at 2023-06-30 (金) 12:17:43 at 2023-06-30 (金) 12:39:41 at 2023-06-30 (金) 16:09:41 at 2023-07-01 (土) 07:05:30 at 2023-07-03 (月) 15:49:19 at 2023-07-03 (月) 16:20:37 at 2023-07-04 (火) 10:29:36 at 2023-07-04 (火) 15:54:19 at 2023-07-07 (金) 07:12:56 at 2023-07-14 (金) 06:45:58 at 2023-07-14 (金) 14:24:10 at 2023-07-22 (土) 12:23:39 at 2023-07-26 (水) 13:15:09, Deleted an attach file: osmctools.zip at 2023-07-26 (水) 14:11:07 at 2023-08-09 (水) 15:30:16 at 2023-08-09 (水) 17:05:57, Deleted an attach file: init.sql at 2023-08-10 (木) 14:33:36 at 2023-08-10 (木) 14:34:21 at 2023-08-15 (火) 20:04:38 at 2023-08-15 (火) 21:02:58 at 2023-08-15 (火) 21:12:29 at 2023-08-16 (水) 08:46:41 at 2023-08-16 (水) 08:47:25 at 2023-08-16 (水) 15:44:09 at 2023-08-16 (水) 16:02:12 at 2023-08-16 (水) 16:09:19 at 2023-09-08 (金) 07:16:17 at 2023-09-08 (金) 07:17:22 at 2023-09-08 (金) 08:14:22

トップ   差分 バックアップ 複製 名前変更 リロード   ページ新規作成 全ページ一覧 単語検索 最新ページの一覧   ヘルプ   最新ページのRSS 1.0 最新ページのRSS 2.0 最新ページのRSS Atom
Counter: 4322, today: 1, yesterday: 3