2017年6月28日水曜日

2017/06/28 Meta data for DENSHI-KOKUDO map tiles #2

2017/06/28 電子国土 地図タイル メタデータがezjnxwinに使えるか? #2
Unfortunately this text is in Japanese only.
 [前回の調査] の続き...
5千万行のCSVファイルをSQLite DB にimportしたので少し調べてみました。

データは x,y,z path 部分だけても1Gバイト位になって、とても配布には耐えないので効率的な記憶方法を考えて作製してみました。生データのZ=8までは縦2×横2の4倍づつ増加してるのに、Z=9~急にデータ量が減少してます。最初はこのメタデータの信頼性を疑いましたが地図を実際に表示してみて理由が分かりました!
Zと各データソースは
 2~ 8 :地球地図(標高)
 5~ 8 :小縮尺地図(500万分1)
 9~11 :小縮尺地図(100万分1)
12~18 :電子国土基本図
となっていて、8以下は全世界が対象ですが9以上は日本の実測エリアの様でデータ量が減った...のだと思います。
「省略」のデータ数は各レベル(Z)単位でデータを平面にプロットした際、その輪郭部分のみ残したデータです。各タイルの上下左右4つすべてに隣接するタイルがあるデータを省略(削除)しました。また中抜けにも対応するため、上下左右どの面に隣接データが有ったかを付加情報として持たせました。これで任意の位置のタイル有無が判別でき、元データへも可逆変換できます。約30万行(0.58%)まで縮小でき5Mbyte位に小さくなりそうです♥

因みにメタデータには各タイル単位に取得日時・ファイルサイズ、ハッシュ値(MD5)情報があるため、各レベル(Z)単位でファイルサイズ合計をsum()してみました。こういう時、RDBはSQL一発なので便利ですね。もちろん上記データ処理もSQLで行いました。集計に間違いなければ、仮に国土地理院の全タイルを取得すると111Gbytesですね。思ったよりも少ない...。
128GbytesのμSDやUSBメモリーに入っちゃう♪

2017年6月22日木曜日

2017/06/17 multi-pitch climbing FYK CARAVAN route at Hyugami

2017/06/17 日向神 マルチピッチクライミング 正面壁 FYK(福岡山の会) キャラバンルート 
Unfortunately this text is in Japanese only.
週末土曜日は天気も良いし、慣れないボルダリングで痛めた(年寄りの冷や水!!)足腰も回復して来たので中国地方のゴルジュ沢でも行こうかなぁ~、誰か行かないかなぁ~とか考えてたらチャーさんから Line で 同行募集♪かかったので、ビレイヤーならという事で手を上げました。フリーかと思いきや、「マルチの準備ね♪」 と。。。前回の日向神は、何も考えずにヒョコヒョコ付いて行って、まさかの [日向神正面壁 FYKルート] 全11ピッチでヘロヘロだったので 「難しいルートはパスで!」 に 「OK~♪」 。現地に到着してルートを訪ねると、またも正面壁!で、FYKルートの4ピッチ目付近を終了点とする直登ルート!
まぁ、どうせオールフォローだし3ピッチだから何とかなるやろ と思って取り付きへ。
取り付きから1st.pitch。
見た目は寝壁♥
「難しいルートはパス」 って言っておいたの ちゃんと考えてくれてるのね♪ このピッチならリードでいけるかも。
で、お気楽フォローで取り付くと。。。ヤバイ。。。微妙!!
リードしなくて良かったぁ~。

2nd.pitch。
少し立って来たように見えるケド。チャーさん慎重に登る。
で、フォローすると。。。これまたヤバイ!
ヌンチャク、ゴボウ、多用(^_^;

3rd.pitch。
出だしは足がかりは有るケド、フォロー泣かせのトラバース。
このブッシユ際の直上がムズくてワタシは手も足も出なかった。チャーさん、よくこんなとこ登れますねぇ~。ワタシは当然ながらブッシュ鷲掴み。他のクライマーに見られたら 「沢かよっ!」 って突っ込まれそう。だって沢ヤだもん。

ラスト直前の小ハング超え。チャーさん、あっさり超えた♪
立ち上がってガバ確認♥

でも、久しぶりの登りのためか腕終わりかけてたので迷わずスリング掛けで人工、、に したのに きつくてモタついてしまった。次回からアブミ持って行こおっと。
オンサイトですね♪
終了点で懸垂下降前に自撮り。
暑くて汗だくかと思いましたが、良い感じに風が吹いてて予想外に快適でした。マルチはフォローでも楽しい、景色も良いし。
本日は "Metolius Safe Tech Deluxe Improved Harness" 初おろしでした。ビレイループが2本あるからマルチ向きで便利かも。

下降は60mロープなんでpitch切らなくて良かった。
しかし、今日ダムは渇水でしたね。
日の当たらない午前中で登り切ってGooでした。
その後、フリーのエリアでクールダウンして帰宅。

本日もありがとうございました。

2017年6月21日水曜日

2017/06/20 Meta data for DENSHI-KOKUDO map tiles

2017/06/20 電子国土 地図タイル メタデータがezjnxwinに使えるか?
Unfortunately this text is in Japanese only.
GPS地図関連に
 「地理院タイル目録 https://github.com/gsi-cyberjapan/mokuroku-spec/
を使うようにすればHTTP404対策が可能は無いでしょうか?」。
とコメントをいただいたので調べてみました。ファイル内容は全タイルのサイズ、更新日時、MD5というものの様です。.gz解凍後のCVS形式で約3ギガバイト。。。先頭と末尾部分。5千万行もあります(^_^;
 1  0/0/0.png,1457603626,77992,7186204bdc21218bf6d9dd0a39b17ef8
 2  1/0/0.png,1457603627,75099,8abde99545d93135816895dd90871856
 3  1/0/1.png,1457607266,49114,b1c45de27b2532a2c11710ad22851675
 4  1/1/0.png,1457607264,76255,0d99409cff6edaad7a722a262a133180
 5  1/1/1.png,1457603624,46597,15ca0df415ce6a3274edf96f65ac65f5
 6  10/861/365.png,1450706972,222,738667a1b2ac6a61a03addc227320bb8
 7  10/861/366.png,1450706950,222,edd701bef084ea879f7845e5cf140266
 8  10/861/367.png,1450706951,222,c43784cad649d3664a2aaf68f035b6fa
 9  10/861/368.png,1450706949,222,beca812cd632578f01f066cda486c8e6
10  10/861/369.png,1450706970,222,8ea3c54f6da6e594e5f90a2b3e81bdbb


50786220 9/475/225.png,1450493985,245,24c8785b9fa816bcd58705dc6c9466f0
50786221 9/475/226.png,1450493985,167,224fc21aaa14b04d1184f143bf880e4c
50786222 check_xyz_overlay.html,1494211591,8081,427d3fb00cb72f371e663d751e2c2768
50786223 {z}/{x}/{y}.png,1459157325,2772,0bf10793eb58a94f6a174c39001d98fc
末尾の2行は形式が違いますね。check_xyz_overlay.htmlは実在しました。デバック用かな?
プログラム組むのも億劫なのでWindows PowerShell で処理してSQLiteに取り込もうとしたら型のエラーが出て調べると不要なデータが。。。PowerShell は所詮スクリプトなので便利だけどデータが大きいため遅くてイライラ。linuxに切り替えました。
$ grep "Thumbs" CatalogFull.csv
12/3557/Thumbs.db,1491710479,33792,04918ce0922b455a27e7f73edc18e0f7
13/7114/Thumbs.db,1491710479,27648,89798295b7c81eddd581bf34eed2cdc7
13/7115/Thumbs.db,1491710479,46592,dc38e8ef224a530c8ad20f5ad88b28ce
14/14222/Thumbs.db,1491710479,29184,f7ce1c2c95618928049a6d9c69ada629
14/14223/Thumbs.db,1491710479,40448,72584412ed0b7ba517c03dccd5e700fc
14/14226/Thumbs.db,1491710479,48128,fe9c4780082945928ccd89cb3a075b46
14/14229/Thumbs.db,1491710479,45568,e4b384919731feb92138f46060af9581
14/14230/Thumbs.db,1491710479,41472,236543cf9543d7cf3c58c8bc524aae6b
14/14231/Thumbs.db,1491710479,43520,0b442c7c9ea8b0977d649dfd099b3c99
"Thumbs.db" って、これgithubに上げる前にWindowsで画像確認してできたサムネイルファイルを一緒にプログラムで処理して固めちゃったんでしょうか?
〇不要な最終行とThumbs.dbの行の削除。行先頭のz/x/y → z,x,y に変換。
 $ cat mokuroku.txt | sed  -e "/Thumbs.db/d" -e "/^[c{]/d" -e "s/.png//g" -e "s/\//,/g"
〇先頭のz,x,y のみなら
 $ cat mokuroku.txt | sed  -e "/Thumbs.db/d" -e "/^[c{]/d" -e "s/\..*//g" -e "s/\//,/g"

因みにPowerShellだとこんな感じかな。
 gc w:\mokuroku.csv | foreach { $_.substring(0,$_.IndexOf(".")).replace("/",",") }
 gc w:\mokuroku.csv | foreach { $_.replace(".png","").replace("/",",") }

試しに2つのCSVをSQLite.dbにテーブル切ってインポートしてみました。インポート プログラムも作製したくなかったので業務使用にも十二分に耐える 「A5:SQL Mk-2」 というFreeWare を使いました。コレ、便利でblog型の画像を表示する機能もあります。予想はしてましたが5ギガバイト!もあります。
HTTP404対応だけであれば z,x,y のみで良いケド、1ギガバイト前後はあるでしょうね。効率的な記憶方法を考えないとチョットですねぇ~ と、いう事で保留に。

2017年6月4日日曜日

2017/06/04 release 0.53β - tool for creating GARMIN Birdseye JNX JAPAN Map for windows(ezjnxwin)

2017/06/04 GAMIN GPS用 Birdseye JNX地図作成ツール公開 Ver.0.53β
Unfortunately this text is in Japanese only.
久しぶりの更新です。と、いっても大した内容ではないのですが。。。

実は1月末に出勤途中に倒れ、意識障害→心肺停止かも??→BLS→救急搬送→入院となりまして...偶然通りかかった医師により心臓マッサージされたみたいで気持ち良かった(ウソです!記憶なし)。倒れたのが人の多い場所 and 偶然にも医師が通りかかったので超ラッキーでしたが、ともすれば凍死で逝ってました。。。皆さんも過労死にご注意。
脳・心臓の精密検査で異常なし。一過性ストレス障害、抑うつ状態!
まぁ、つまりは自律神経失調症→軽いうつ病ですね。精神科の処方した比較的安全性の高いといわれる抗うつ剤(SSRI)が合わずに副作用で再び死にそうになり、睡眠薬(ゾルピデム酒石硝酸塩:マイスリーのジェネリック)で凌ぎ、 おかげ様で何とかクライミングや沢にも行けるようになりました。

地図作製範囲の指定の際に使用していた国土地理院のwebサイトの仕様に変更があったため、正常に動作しなくなっていたのをコメントで教えていただきました。ありがとうございます。
1次、2次メッシュが表示されて便利なサイトだったのですが、ダウンロード専用に単一または複数のメッシュを選択できる便利な仕様になったのですが、ezjnxwinの範囲指定には使いにくくなりました。で、メッシュは表示されませんが、ウォッちずのサイトを使用する様にしました。


リンクの物置に入ってます。お約束の自己責任で! 
本体ZIP  : (GISGPS/software/ezjnxwin-v0.53beta-20170604.zip) 
MD5hash:5ee3d9a722d41bfa57c6f51821d0acdd
最新情報はコチラで → [GPS地図関連]

 ・国土地理院のダウンロードサイトleaflet webの仕様変更により、ウォッちずへ変更。

2017年1月2日月曜日

HAPPY NEW YEAR 2017

2017/01/01 新年あけましておめでとうございます。
Unfortunately this text is in Japanese only.
2017年 明けましておめでとうございます。
今年もよろしくお願いいたします。
例年であれば年末から家族が家出中に どん兵衛食べて年越を越し、酒呑んで寝正月のついでに自宅警備員なのですが、何故か今年は在宅しており、初売りやら挨拶回りやらに駆り出されるため落ち着いてグタグダできない。。。まぁ、それでも去年1年の山行で無事に下山出来、 沢・山仲間と共に無事に過ごせた事に感謝です♥
今年も仕事は出稼ぎや既にイロイロと面倒が予想されていますが、気にせずに沢へ出かける所存です。

電子工作や無線関連などToDoが多くて遊びきれませんが、徒然なるまま気の向くままにやっていきます。(微妙なコンテンツでblogでは公開できるものは少ないですが。。。)

今年も元気にバカな楽しい遊びができますように♪ 1月吉日 pooh@manatee0223
--

2016年12月23日金曜日

2016/12/23 map source for SAS.PLANET

2016/12/23 SAS.PLANET 国土地理院のマップソースをゴニョってみた
Unfortunately this text is in Japanese only.
 [SAS.Planet でGARMIN BirdsEye JNXファイルを作ってみた] の記事のコメントで国土地理院のマップソースの うp request いただいたので、自分用にと適当に作成したものだったので見直してみました。
GISとは無縁だし、ロシア語のwiki見た結果ですので当てにはできませんが一応動作してるので。
動作検証は、この時点の最新 SAS.Planet Release.160707 です。
出典表示等、できる限りのことはやりましたが使用にあたっては全て使用者の責任にてよろしくです。

リンクの物置に入ってます。お約束の自己責任で! 
ZIP(国土地理院)  : (GISGPS/data/Kokudo.zip) 
MD5hash           :116203a5964b9aff209c64e1244f88e3
ZIP(Y!)              : (GISGPS/data/Yahoo!Japan.zip) 
MD5hash           :ea3bcf7cfefb75041f58e180107e7bef
最新情報はコチラで → [GPS地図関連]
 以下、SAS.GISのwikiとこの時点の最新安定版 SAS.Planet Release.160707 のhackより
展開ルートフォルダを "/" としてます。

/Maps/sas.maps の下に展開してください。
    Kokudo
      |
      *--/Chiriin.zmp
          |
          *-- params.txt(必須)
          *-- GetUrlScript.txt(必須)
          *-- 18.bmp
          *-- 24.bmp
          *-- info.txt

拡張子 .zmp を持つフォルダに最低2つの定義ファイルが必要みたいです。
params.txt        ... 地図の定義(必須)
GetUrlScript.txt ... 地図タイル取得URLの定義(必須)
18.bmp            ... メニューのアイコン
24.bmp            ... メニューのアイコン
info.txt             ... 地図の情報


面白いのは GetUrlScript.txt の記述で、SAS.PLANETがDelphiで書かれている事で、Pascalで書ける事です。
テキストファイルですので適宜修正可能です。「Settings」 メニューの 「Map Settings」 でも"Settings"は項目変更・設定、"Listings"は表示可能です。








詳細は本家SASGISのwiki見て下さい。ロシア語を日本語翻訳したら???だったのですが、英語翻訳はだいぶマトモだったので、自動翻訳するなら英語がお勧めです。定義ファイルに関連する一部を転写しておきます。

Description custom card format zmp

For each map service program requires information about the parameters of the service. Description of these options is presented in a zip-archive with the extension .zmp a separate folder with postfix .zmp, which are stored in maps folder.
Archive / folder with the extension / postfix .zmp may contain the following files and folders:
  • params.txt (required) - the parameters of the card;
  • GetUrlScript.txt (required) - the script which is responsible for the formation of a reference to the map tile, and custom headers;
  • info.txt - information on the map;
  • graphics files, a link to which is available in the info.txt (eg, maps legend);
  • EmptyTiles - directory containing the samples of tiles, which are not downloaded from a server (for example, a fully transparent tiles). In some cases, the server gives "Dummy" in a format different from the format of conventional tiles, for example, conventional tiles - jpg, and "Dummy» - png. SAS.Planeta also overwrites all made tiles in the format specified in the Ext option (see. Below). In such cases, the samples should be used as source files sent by the server, rather than taking it from the cache program.
  • 18.bmp - file icons displayed in the menu (bmp, 18 × 18, the pix, background color RGB (255,0,255));
  • 24.bmp - file icons displayed on the toolbar (bmp, 24 × 24, the pix, background color RGB (255,0,255)).
The latest version of the program instead of 18.bmp 24.bmp and you can use one file named 24.bmp. The contents of this file - an arbitrary size image as bmp, png, ico, and the other (with the extension bmp).

params.txt

File Options params.txt :
Section [PARAMS]
  • asLayer - if equal to 1, the card is used as a layer laid over the main map.
  • pNum - serial card number in the menu.
  • The GUID - a unique identification card number (GUID generator can be found online, for example here ).
  • ParentSubMenu - the name of the parent item menu for the card in Russian.
  • ParentSubMenu_en - the name of the parent item menu for the card in English.
  • ParentSubMenu_uk - the name of the parent item menu for the card in the Ukrainian language.
    • it is possible to specify the hierarchical menu items by dividing the symbol "\" (eg ParentSubMenu = Google \ Planet)
  • name - the name of the card in Russian.
  • name_en - name card in English.
  • name_uk - map name in the Ukrainian language.
  • CacheType - cache type that will store the tiles of the card:
    • 0 - default
    • 1 - GoogleMV
    • 2 - SAS.Planet
    • 3 - EarthSlicer 1.95
    • 4 - GlobalMapper Tiles (GMT)
    • 41 of - GlobalMapper Aux
    • 42 - GlobalMapper Bing
    • 43 - Mobile Atlas Creator (MOBAC)
    • 44 - OsmAnd + Tiles
    • 45 - Tile Map Service (TMS)
    • 5 - Google Earth
    • 51 - GoogleEarth Terrain
    • 6 - BerkeleyDB
    • 61 - BerkeleyDB (Versioned)
    • 7 - DBMS (database management system)
    • 71 - SQLite3
    • 8 - GeoCacher
    • 9 - RAM (not written to disk)
  • DefURLBase - unchangeable part of the address links to maps tiles.
  • projection - a projection map. 1 - Mercator to spheroid, 2 - Mercator to ellipsoid, 3 - latitude / longitude.
  • sradiusa - semi-major axis radius of an ellipsoid.
  • sradiusb - radius at half-axis ellipsoid.
  • The EPSG - the projection of the code card.
  • NameInCache - folder name in the cache, which will be recorded tiles card.
  • separator - a separator in the form of a horizontal line that appears in the menu after the card (1 - display, 0 - do not display).
  • The Ext - expansion of the tile (.jpg, .png, .bmp, .gif ). It specifies the format in which you will be forced to persist card if ContentType other.
  • UseDwn - if equal to 1, then download map tiles are allowed.
  • The Sleep - the value of the pauses between downloads of individual tiles in milliseconds.
  • DefHotKey - hotkeys for this card.
  • The ContentType - type of downloaded data (eg, image / jpeg, image / png ). It is possible to use several types simultaneously.
  • DefaultContentType - the type that will be used if the server did not return any type or if there is a type of neglect, returned by the server.
  • IgnoreContentType - ignoring the type returned by the server.
  • DetectContentType - if equal to 1, after loading the tile will perform an analysis of its contents and the correction field Content-Type Header in server response
  • MimeTypeSubst - substitution of the type of downloaded data (for example, «image / png8bit = image / png»).
  • TILERLEFT, TILERRIGHT, TILERTOP, TILERBOTTOM - options for trimming downloaded tiles to the left, right, top and bottom. If the resulting rectangle does not coincide with a square 256 × 256, and it is more stretched or compressed to this size.
  • UsePreloadPage - if equal to 1, use a pre-loads the page (be sure to specify its address).
  • PreloadPage - the address of the page pre-loaded.
  • RequestHead - custom HTTP-headers (headers), transmitted to the server. The fields must be separated with the \ r \ n (example: RequestHead = Referer: maps.kosmosnimki.ru \ r \ nConnection: Keep-Alive).
  • Version - version of the tile corresponds to a variable in Version GetUrlScript.txt.
  • MaxConnectToServerCount - the maximum number of threads. The default value is set in section [ZmpDefaultParams] SASPlanet.ini file
  • IsUseDownloaderInScript = 1 - the use of download within the script to add here
  • UseMemCache - use in-memory cache (if CacheType = 9 (the RAM-cache) disable this option will result in an error), enabled by default
  • MemCacheCapacity - number of tiles cached in memory. Default = 100
  • MemCacheTTL - the lifetime of the tiles (milliseconds), cached in memory. Default = 60000 ms. (1 min.)
  • MemCacheClearStrategy - cleaning strategy (for TTL) of cached in memory tiles. Valid values: 0 - remove all tiles from the meme-cache if the TTL has expired from the oldest tile; 1 - to remove all tiles from the meme-cache if the TTL expired at the youngest of the tile; 2 - only remove tiles that have expired TTL. The default mode is enabled 1.
  • RestartDownloadOnMemCacheTTL - automatically redownload tiles within the visible area of the screen while cleaning mem-cache (only works if UseMemCache = 1). The default is off.
  • © = License, - the text of the license, which will be displayed in the upper left corner of the map. Required to comply with the terms of distribution of some cards.
  • LayerZOrder - the display order of layers, the default 0. The layers with the higher value will be displayed on top of the layer with a lower value
  • IsReadOnly = 1 - use the cache in the "Read Only"
  • IteratorSubRectSize - the size of the vertical and horizontal, as measured in standard tile (256x256 pixels) when downloading the so-called "megataylov", ie tiles with the sizes of more than 256x256 pixels. (Only SACS)
  • IteratorSubRectAlign - if 0 - the default everything, if not 0 (1 or 2), carried out an exact binding to the size megatayla. If not 1 and 2 - it will be further increased size viewing region was even possible to download, for example, one in the top left tile mode cache + internet shear window left and up. Interpretation of obscure interested to look here . (Only SACS)
  • CutCountX = 0 (the number of pieces on the X, optional)
  • CutCountY = 0 (respectively Y)
  • CutSizeX = 0 (a piece of size X, if not defined - is taken from the 256 parameters)
  • CutSizeY = 0 (respectively Y)
  • CutTileX = 0 (the position of the requested tile in the overall picture for X)
  • CutTileY = 0 (respectively Y)
  • CutToSkip = (0,0), (0, -1) list of tiles that you want to miss (relative CutTileX, CutTileY).
Section [ViewInfo]
  • The EPSG - the projection of the code card for output to the screen.
Some parameters of the card can be changed within the program file params.txt without editing. To do this, go to Settings → Settings card or press the Ctrl + the Alt + the P . Custom change card settings are stored in maps / maps.ini file.

GetUrlScript.txt

File GetUrlScript.txt contains a script that generates complete reference address on the card files. Scripts are written in the usual Pascal.

info.txt

The file info.txt contains textual information on the map. Use the syntax of the HTML (in particular, it is necessary to separate the paragraphs tagged <BR>). It is also possible to display image files (for example, map legend), using the following tags:
<Img src = "Full path \ image file" /> or
<Img src = "image file"> (if the file is in zmp).

2016年12月17日土曜日

2016/12/10~11 Hiking Mt.Kurodake,party and cleaning at Hyugami-tower

2016/12/10~11 くじゅう黒岳ハイキング 忘年会 & 日向神タワーお掃除
Unfortunately this text is in Japanese only.
今年も恒例の年末忘年山行、忘年会に混ぜていただきました。

ルートはくじゅうの縦走ハイキング。白水鉱泉~前岳~高塚山~天狗~ソババッケ~男池です。この週は暖かく、通年だと積雪したハイキングが楽しめるのですが、今年は冬枯れの道です。
久しぶりのルート。何年ぶりでしょうか。。。

霧氷がチョロっと付いてました。

三俣山・平治岳方面。ココは紅葉の時期は綺麗ですよね。今日は快晴無風で気持ちの良いハイキングです。

高塚山から天狗を臨む。黒岳は山域の名称で、peekは前岳と高塚山ですね。

青空と白い雲、気持ちの良いハイキングです。

久しぶりに登山靴履いてフツーの山歩きしましたが、たまにはこういうも良いですね。

下山後は森の家で天然かけ流しの温泉で暖まり、食べて飲んで語って居眠りして、また飲んで風呂入って...と楽しい夜は更けていきます。今年も皆揃って集まれた事に感謝。

翌日は日向神へ。
日向神タワー(通称?)のルート開拓のお手伝いでお掃除です。デッキブラシが似合います♥
 
この面だけでも3~4本はルート引けそうですね♪日が当たる所は暖かいですが、日陰は少し肌寒いです。

掃除に夢中になる面々。。。














清掃後、皆さんトップロープで試登。このルートの1pitch目は完成でしょうか?ワタシも触らせていただきました。途中で降ろしてって言ったのに降ろしてもらえず、必死に登ってTRノーテンで何とか top out 出来たので、リードする事を考えると5.10a位になるのかな。pinは安全な間隔で遠くないので、辛い人なら5.9ですかね。 まぁ、gradeの事は良く分かりませんが、外岩は楽しいですね♪