2022/08,江端さんの技術メモ

OpenStreetMapを使って、シミュレータを作成していますが、昨今のセキュリティ事故などを鑑みて、インターネットへのアクセスが一切禁じられた状態での使用を想定しておかなければなりません。

という訳で、OpenStreetMapから地図をバラバラにした画像ファイル(タイル)のダウンロードを試みているのですが、適当にダウンロードすると、不要なタイルまでダウンロードして、

(1)OpenStreetMapのサーバに負荷を与える(という公的な理由)こと

(2)ローカルに不要なファイルが大量に残る(という私的な理由)こと

が、なんとも気にいりません。

ならば「キャッシュに残っているタイルだけをダウロードすればよくね?」と思い(足りなくい部分が見つかったら、その部分だけ再度ダウンロードすればいい)、検討を開始しました。

先ず、キャッシュされている情報を確認してみました。

展開すると、こんな感じ

さて、キャッシュされている、タイルのダンロード先を見つける方法が必要でした。

これは、chrome_cache_view というツールを使うことで解決できそうであることが分かりました。

↓をクリックすると、画面に飛びます。

で、ここからダウンロードします。

解凍して、exeファイルをクリックします。

こんな感じでタイルサーバの位置とファイル名が分かります。

で、tile.osm.org の部分のファイルだけを取り出せればよいのですが、(今のところ、私には、見つけられていません)ので、"Edit" → "Select All" で全部のテキストを取り出して、適当にファイルをぶった切って、取り出すことにしました (良いやり方があったら、私に教えて下さい)。

# ちなみに、この取り出し方は、皆さんの方で好きなようにやって下さい(私は、grepと、emacsを使って手動で切り出すことにしました)。

私の場合、まず、"Edit" → "Select All" で全部のテキストをdummy.txtという名前で保存して、

grep tile.osm.org dummy.txt > dummy2.txt

として

になっている状態で、emacsのkill-rectangle で両端を切り落しました。

さて、ここから問題なのですが、OpenStreetMapの格納方法は、なんでもダウンロードすれば良い、というものではなく、ルールがあります。

/* map の表示準備 */
const map = L.map("map", {
    attributionControl: false,
    zoomControl: false
}).setView(CENTER_LATLNG, 14);
if (USE_OFFLINE_MAP) {
    L.tileLayer('images/map-yamaguchi/{z}/{x}/{y}.png', {
        detectRetina: true,
        minZoom: 13,
        maxZoom: 15,
    }).addTo(map);
}
else {
    L.tileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {
        detectRetina: true,
        maxNativeZoom: 18
    }).addTo(map);
}
つまり

https://c.tile.osm.org/18/232959/102413.png
の場合、

"18"というディレクトリを作成し、さらにその中に"232959"というサブディレクトリを作成し、その中に"102313.png"というファイルを配置させる必要があるのです。

これを実施するプログラムをGolangで作りました。

/*
	main13.go

	キャッシュで取り込まれているOpenStreetMapのタイル画像(png)を、ローカルに取り込んで、
	ネットに繋がれていない状況でも、OpenStreetMapを使えるようにする

	前提
	http://www.nirsoft.net/utils/chrome_cache_view.html からChromeCacheView をダウンロードして、
	"https://b.tile.osm.org/13/7284/3196.png"などを取得しておくこと
*/

package main

import (
	"io"
	"net/http"
	"os"
	"strings"

	_ "github.com/lib/pq"
)

func main() {

	var urls = [...]string{
		"https://b.tile.osm.org/13/7284/3196.png",
		"https://c.tile.osm.org/18/232959/102413.png"} // ここに取得したいURLを記載する

	for _, url := range urls {

		arr1 := strings.Split(url, "/")

		//fmt.Println(arr1[3]) // 確認用
		//fmt.Println(arr1[4]) // 確認用
		//fmt.Println(arr1[5]) // 確認用

		os.Mkdir(arr1[3], 0777) // ディレクトリを掘る(すでに掘っていてもOKみたい)
		os.Chdir(arr1[3])       // カレントディレクトリを移動する
		os.Mkdir(arr1[4], 0777) // ディレクトリを掘る(すでに掘っていてもOKみたい)
		os.Chdir(arr1[4])

		response, err := http.Get(url)
		if err != nil { // カレントディレクトリを移動する
			panic(err)
		}
		defer response.Body.Close()

		file, err := os.Create(arr1[5])
		if err != nil {
			panic(err)
		}
		defer file.Close()

		io.Copy(file, response.Body) // ここでダウンロードしたファイルをセーブ

		err = os.Chdir("../..") // ディレクトリを元の位置に戻す(2つ上がる)
		if err != nil {
			panic(err)
		}
	}
}

こんな感じで、上手く動いているようです。

上手く動いていません。

 

ダウンロードした全部のファイルに、

Access denied. See https://operations.osmfoundation.org/policies/tiles/

というテキストが書かてているファイルがダウンロードされています。

どうも、以下の問題みたいです。

Technical Usage Requirements

  • Valid HTTP User-Agent identifying application. Faking another app’s User-Agent WILL get you blocked. Using a library’s default User-Agent is NOT recommended. If a device automatically sends an X-Requested-With header with an application specific Application ID, this will be considered an acceptable substitute for the HTTP User-Agent, although we still recommend setting a valid HTTP User-Agent for the application.
  • When coming from a web page, a valid HTTP Referer. Apps generally do not have a HTTP referer.
  • DO NOT send no-cache headers. (“Cache-Control: no-cache”, “Pragma: no-cache” etc.)
  • Cache Tile downloads locally according to HTTP Expiry Header, alternatively a minimum of 7 days.
  • Maximum of 2 download connections. (Unmodified web browsers’ download limits are acceptable.)

技術的な使用条件
アプリケーションを識別する有効なHTTP User-Agent。他のアプリケーションのUser-Agentを偽装すると、ブロックされる可能性があります。ライブラリのデフォルトのUser-Agentを使用することは推奨されません。デバイスがアプリケーション固有の Application ID を持つ X-Requested-With ヘッダを自動的に送信する場合、これは HTTP User-Agent の代用として認められますが、アプリケーションに対して有効な HTTP User-Agent を設定することを推奨します。
ウェブページからアクセスする場合は、有効なHTTP Refererを指定します。アプリは一般的にHTTP Refererを持ちません。
no-cacheヘッダを送信しないでください。("Cache-Control: no-cache", "Pragma: no-cache" など)
HTTP Expiry Headerに従ってTileダウンロードをローカルにキャッシュします。
ダウンロード接続は最大2回まで。(修正されていないウェブブラウザのダウンロード制限も許容されます)。
注:標準的な設定の最近のウェブブラウザは、一般に上記の技術的要件をすべてクリアしています。

今、対策中です。暫くお待ち下さい。

以下のように変更したら動きました。


/*
	main14.go

	キャッシュで取り込まれているOpenStreetMapのタイル画像(png)を、ローカルに取り込んで、
	ネットに繋がれていない状況でも、OpenStreetMapを使えるようにする

	前提
	http://www.nirsoft.net/utils/chrome_cache_view.html からChromeCacheView をダウンロードして、
	"https://b.tile.osm.org/13/7284/3196.png"などを取得しておくこと
*/

package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"

	_ "github.com/lib/pq"
)

func main() {

	var urls = [...]string{
		"https://c.tile.osm.org/18/232959/102413.png",
		"https://b.tile.osm.org/18/232955/102413.png",
		"https://c.tile.osm.org/18/232959/102413.png"} // ここに取得したいURLを記載する

	for _, url := range urls {

		arr1 := strings.Split(url, "/")

		//fmt.Println(arr1[3]) // 確認用
		//fmt.Println(arr1[4]) // 確認用
		//fmt.Println(arr1[5]) // 確認用

		os.Mkdir(arr1[3], 0777) // ディレクトリを掘る(すでに掘っていてもOKみたい)
		os.Chdir(arr1[3])       // カレントディレクトリを移動する
		os.Mkdir(arr1[4], 0777) // ディレクトリを掘る(すでに掘っていてもOKみたい)
		os.Chdir(arr1[4])

		/*  削除
		response, err := http.Get(url)
		if err != nil { // カレントディレクトリを移動する
			panic(err)
		}
		defer response.Body.Close()
		*/

		// 追加(ここから)
		client := &http.Client{}

		req, err := http.NewRequest("GET", url, nil)
		if err != nil {
			fmt.Println(err)
			return
		}
		req.Header.Set("User-Agent", "super-go-client")
		// 追加(ここまで)

		file, err := os.Create(arr1[5])
		if err != nil {
			panic(err)
		}
		defer file.Close()

		// 追加(ここから)
		r, _ := client.Do(req)
		defer r.Body.Close()
		// 追加(ここまで)

		/*
			_, err = io.Copy(file, response.Body) // ここでダウンロードしたファイルをセーブ
		*/

		// 追加(ここから)
		_, err = io.Copy(file, r.Body)
		// 追加(ここまで)
		if err != nil {
			panic(err)
		}

		err = os.Chdir("../..") // ディレクトリを元の位置に戻す(2つ上がる)
		if err != nil {
			panic(err)
		}
	}
}

これで、画像ファイルとして取り出せることが確認できました。

req.Header.Set("User-Agent", "super-go-client")

がポイントだったようです。

予想通り、キャッシュのないところが、欠けています。これは、運用して直していけばいいので、そのうち直します。

ちなみに、index.htmlの方は、

var map = L.map("map", {
			attributionControl: false,
			zoomControl: false
		}).setView(new L.LatLng(36.56240644, 139.9501693), 14); // 宇都宮

		//L.tileLayer('http://localhost:8080/static/{z}/{x}/{y}.png',{
		L.tileLayer('static/{z}/{x}/{y}.png',{
        	detectRetina: true,
        	//minZoom: 13,
        	//maxZoom: 15,
			maxNativeZoom: 18
    	}).addTo(map);


		//L.tileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {
		//	detectRetina: true,
		//	maxNativeZoom: 18
		//}).addTo(map);

のように、

L.tileLayer('http://localhost:8080/static/{z}/{x}/{y}.png',{

でも、

L.tileLayer('static/{z}/{x}/{y}.png',{

でも、動作するようです。

未分類

https://operations.osmfoundation.org/policies/tiles/

を読んでいると、「頻繁なタイルサーバへのアクセスは勘弁してくれ」と読めます。

とすれば、ローカルなタイルのコンテンツのダウンロードして、ローカルで使うのはOK?(あるいは歓迎?)かな。

基本的には、「最近のブラウザは、ちゃんとキャッシュしているから、大丈夫だと思うけど」とも記載されています。


「一括ダウンロードは強く推奨されません。不必要にタイルをダウンロードしないでください。特に、ズームレベル13以上の250以上のタイルをオフラインまたは後で使用するためにダウンロードすることは禁じられています。」

「これらのタイルは一般に、事前にサーバーで利用可能(キャッシュ)ではないため、これらの要求に対して特別にレンダリングする必要があり、利用可能なリソースに不当な負担をかけることになります」

なるほど、「レベル13以上であれば、レンダリングの処理でサーバを直撃してしまう」ということですね。

で、私の場合は、

(1)サーバに負荷を与えないことにもなる、ローカルへの、1回こっきりのタイルコンテンツのダウンロード

(2)レベル14以上の使用

(3)タイル数は30個くらい?

だから、大丈夫かな、と思っています。

以上

 

2022/08,江端さんの忘備録

75kg超えのテレビを、普通の夫婦二人が、2階に運び、さらにタンスの上に上げる方法(中編)

ぎっくり腰のリスクを抑える為に土曜日に中断した作業を、日曜日に再開しました。

I restarted the operation which were stopped on last Saturday, to avoid the risk of my slipped back.

その前に、このテレビの正確な重量を計測しておこうと思い、テレビの下に体重計を捩じ込みました。

Before that, I wanted to know the aaccurate weight of the TV, so I pushed the scale under the TV.

なるほど、これは、素人が運べる類いのものではない、と認識しました。

I realized that this operation is beyond my imagination for me, as an amature.

ただ、十数年前に、このテレビを設営したは、私のはずです。

However, it was me to install this TV more that a decade ago.

しかも当時もネットで購入しましたので、アシスタントはいなかったはずです。

In addition,at that time, I bought it from a net site, so there should not have any assistant.

どうやって、このテレビを自力で設置できたのか、今となっては全く思い出せません。

I don't remember how I could have install this TV by myself.

もし、『月日とともに、テレビの重量が増していく』という(オカルトのような)話を知っている方、御一報下さい。

If you know of any (occult-like) stories about 'TVs gaining weight over the months', please let us know.

それはさておき。

That asaide.

-----

課題は、この目の前にある、途方もなく高い山の頂きに、どうやって、このテレビを登頂させるか、です。

The problem is how to make the TV climb up a tremendously high mountain in front of me.

私の案出した方法は、極めて原始的な方法です ―― 『コンクリートブロックを詰み上げながら、テレビをリフトアップする』です。

My idea was very primitive. 'Lifting the TV while packing up the concrete blocks'.

しかし、この方法の場合、コンクリートブロックは合計28個必要となります。コスト的には大したことはありません(1個100円くらい)が、用途のないコンクリート28個の処分方法の方が問題でした。

However, this method requires a total of 28 concrete blocks. the prices were no problem (about 100 yen per unit), but another problem was more about how to use about 28 concrete pieces.

倉庫の中を見たら、脚立が2台あることに気がつきました。これを使って、半分の高さまで上げることができそうでした。

I looked inside the warehouse and noticed that there were two stepladders. Using these, I can lift the TV up to half height of the chests.

高い位置でテレビを支えられるよう、ロープで両端を縛って、脚立の上に、片方づつ引っ掛けて上げていきました。

To support the TV in a high position, the two ends were tied together with rope and raised on a stepladder, hooking one end to the other.

嫁さんには、私が片端を上げるタイミングで、脚立を動かして貰いました。

I asked my wife to move the stepladder at the same time I raised one edge of the TV.

そして、脚立の最上段に来た後は、嫁さんにコンクリートブロックを差し込んで貰って、同じように作業を続行しました。

Then, after coming to the top of the stepladder, I asked my wife to insert the concrete block and continued the same way.

コンクリートブロックを7つ積み上げたところで、あと数センチが足りないことが分かりました。

After stacking seven concrete blocks, I found that a few more centimetres were missing.

しかし、用意したコンクリートは使い果しました。

However, I ran out of the concrete blocks I had prepared.

不安定な脚立の上に立って、残り数センチ分持ち上げて、テレビ台を箪笥のへりに引っ掛けて、あとは夫婦二人で力付くで押しこみました。

I stood on the unstable stepladder, lifted the remaining few centimetres, hooked the TV stand to the edge of the chest, and the rest was pushed in by us with great effort.

こうして、重量75kg超えのテレビを、140cmの箪笥の上に持ち上げることに成功しました。

We thus succeeded in lifting a TV weighing over 75 kg onto a 140 cm.

-----

とは言え、相当危険な作業であったことは否めません。

However, this was quite dangerous.

ブロックの山が崩れる可能性がありましたし、脚立が、耐過重量を超えて、自壊する可能性もありました。

There was a possibility that the pile of blocks could collapse, and the stepladder could overstrength and self-destruct.

これで、大怪我したら、多分、誰からも同情して貰えないことは、確実です。

It is absolutely sure nobody give me sympathy even if I am seriously injured.

ただ、私としては「なんでも業者に頼む」という姿勢は、なんか『負けたような気がする』のです。

However, for me, the attitude of 'ask the contractor for everything' is something of a 'lose-lose' situation.

まあ、これは、私の性分です。

Well, this is my nature.

-----

で、これを書いていて思い出したコラムがこちらです。

Today's diary meminded me that the column I wrote before.

結局のところ、私は、若いころから、全く進歩していないようです。

After all, I don't seem to have progressed at all since my youth.

2022/08,江端さんの忘備録

75kg超えのテレビを、普通の夫婦二人が、2階に運び、さらにタンスの上に上げる方法(前編)

そもそも、夫婦で持ち上げるだけでも大変なテレビを、どうやって2階まで持ち上げるかが問題でした。

To begin with, the problem was how to lift the TV upstairs, which is a difficult task just to lift for us.

普通に持ち上げで運ぶのは、最初の階段の2段目で「不可能」と判断しました。

We judged that the normal way to carry it by lifting was impossible at the second step of the first staircase.

2段目でテレビの片方を階段にひっかけて、もう一方を椅子に置いたところで、私は、長考に入りました。

On the second step, with one end of the TV hooked to the stairs and the other on the chair, I start thinking for a long time.

-----

「抱えて運ぶのは無理」、となれば、「上から引っ張り上げ、かつ、下から押し上げるかしかない」ということになります。

If it's impossible to carry it, then the only way is to pull it up from above and push it up from below".

階段1段づつ上げては、その度にロープで固定しなおして、休憩をして、かつロープで引き上げる、という、『超牛歩戦略』を案出しました。

I devised a 'super-snail's pace strategy', where we would go up the stairs one step at a time, re-fasten the rope each time, take a break, and then pull it up with the rope again.

私は、ロープを購入しに、ホームセンタに走りました。

I ran to a DIY-shop to buy a rope.

しかしロープを手に入れたところで、問題がありました。そのロープの括り先が『ない』ということです。

But once I had the rope, there was a problem. The rope had 'no' place to bind it.

我が家は、2x4工法で建てられているので、そもそも「柱」というものがありません。

Our house is built using the 2x4 construction method, so there are no 'pillars' to begin with.

そこで、20メートルのロープを私の部屋までひっぱりこんで、例の鉄棒に括りつけることにしました。

I then decided to pull a 20-metre rope up to my room and tie it to the iron bar.

部屋に鉄棒を作ってみた

毛布で敷き詰めた階段の上にテレビを置いて、嫁さんが上からロープでひっぱり上げ、私が下から押し上げながら、1時間弱の時間をかけて、ようやくテレビを二階の踊り場に持ち上げたところで、その日(土曜日)の処理を終了しました。

We finished the day's (Saturday's) process when we finally lifted the TV onto the upstairs landing after less than an hour of placing it on the blanket-lined stairs, with my wife pulling it up with a rope from above and me pushing it up from below.

しかし、まだ、この段階では、このテレビをタンスの上に持ち上げる手段がありませんでした。

However, there was still no means of lifting this TV onto the wardrobe at this time.

私は、再び、長考に入りました。

I again began to think for a long time.

75kg超えのテレビを、普通の夫婦二人で、2階に運び、さらにタンスの上に上げる方法(後編)

2022/08,江端さんの忘備録

かねてより、嫁さんが、新しいテレビを欲しがっていました。

My wife has wanted a new TV for a long time.

今のテレビは、本体の地デジのチューナーが故障しているのですが、BSは見れるし、HDDレコーダのチューナを使えば地デジの視聴にも問題はなかったので、私は難色を示していました。

Our current TV has broken terrestrial digital tuner on the unit, however, we can watch BS channels and can use terrestrial digital tuner of the HDD recorder. Therefore I had difficulty with it.

とは言え、近年の画面の大型化と高機能化、テレビの値段の定価なども鑑みて、新しい液晶テレビを購入することになりました。

Nevertheless, in light of the recent trend toward larger screens and higher functionality, as well as the fixed price of TVs, we decided to purchase a new LCD TV.

そして、古いプラズマディスプレイ(当時27万円)は、2階の寝室に置くことにしました。

And the old plasma display (270,000 yen at the time) was to be placed upstairs in the bedroom.

まだ十分に使えるからです。

Because it still works well.

この時の私は、テレビの移設など、1~2時間程度の作業で終わると思っていました。

At that time I thought the work would only take an hour or two, such as relocating the TV.

-----

嫁さんと二人でテレビを持ち上げたその瞬間、腰に稲妻のような痛みが走りました。

At the moment my wife and I lifted the TV, I felt a lightning bolt of pain in my lower back.

―― これはダメだ

"This is no good."

と直感しました。

I had the feeling.

私、これまで何度も腰をやってきたので、十分な注意をして運搬に着手したのですが、もう、なんというか『絶対的に無理』という重さであると直感しました。

I have had many hiccups in my life, so I set out to transport it with sufficient caution, but I already had a gut feeling that it was kind of an 'absolutely impossible' weight.

私、昔、山岳系のサークルに入っていたので(半年でやめましたが)、20~30kgまでの重さは、感覚的に分かります。

When I was a college student, I joined a climbing club(I retired in half year) , so I can feel to estimate the weight which ranges from 20 to 30kg.

しかし、"このテレビ、その重さのレベルではない"、ということが、一瞬で分かりました。

However, I could understand "The weight of this TV is our of scope" in a flash

こうして、「夫婦二人で、このテレビを二階に上げ、さらに、それをタンスの上に上げるという」過酷な週末が始まったのです。

Thus, the harsh weekend had started "How a ordinary couples can carry a TV weighing over 75 kg upstairs and then up to the top of a wardrobe"

75kg超えのテレビを、普通の夫婦二人が、2階に運び、さらにタンスの上に上げる方法(中編)

(To be continued)

2022/08,江端さんの忘備録

最近、「マスクを手放すのが嫌だ」という人がいるようです ―― 特に女性の方々。

Recently, some people have been saying that they don't like to give up their masks -- especially women.

「メイクの手が抜ける」というのが主要因のようです。

The main reason seems to be "I can cut corners of making up."

以前、私、『「ブルカ」は、女性の役に立っていることがあるかもしれない(ラクな方向に)』という仮説を提唱したことがありますが、検証はしておりません。

Previously, I proposed the hypothesis that "burqa" may be helpful for women (in easy direction), however I have not tested it.

-----

幸いなことに、わが国は、イスラム原理主義者の中でも、特に『コーランの文意を読み取れない』低能なテロリストによる事件は、『まだ』発生していないようです。

Fortunately, our country does not seem to have "yet" had any incidents by Islamic fundamentalists, especially low-level terrorists who 'cannot read the letter of the Koran'.

とは言え、やつらがわが国に入りこんでくるのは、時間の問題かもしれないなぁ、とは思っています。

However, I think that no sooner they will land our region.

その一方、永遠の入ってこないかもしれない、とも思っています。

On the other hand, I also think they might not come eternally.

私、以前、コラムの中で、こんなこと書いています。

Before I wrote the following in my column.

=======

もし私が、イスラム原理主義者のテロリストに銃を突き付けられて、「イスラムに改宗しろ!」と言われたら、1秒もたたずに「いいよ」と言いますし、1分後にはコーランの暗記を始めることもできます。

If I were held up at gunpoint by a fundamentalist Islamic terrorist and told, "Convert to Islam!" I would say, "Okay," in less than a second, and I could start memorizing the Koran a minute later.

というか、銃を突きつけられてまで「改宗に同意しない」って感じが理解できない。

I mean, I don't understand the feeling of "I don't agree to convert" even if I put a gun to my head.

ぶっちゃけ、言うだけならタダじゃん、て思っています。

To be frank, I think "just saying it is free.

このように、宗教的観念が空気のように希薄なわれわれ日本人の在り方は、宗教を根拠とした戦争や虐殺や殺りくの無意味さを、世界に対して雄弁に語るはずなのです。

Thus, we Japanese, whose religious views are as weak as air, can speak eloquently to the world about the meaninglessness of wars, massacres, and killings on the basis of religion.

=======

とは言え、イスラム原理主義テロリストに対する施策は、しておくに越したことはありません。

Nevertheless, any measure against Islamic fundamentalist terrorists is better than nothing.

そこで、

So,

―― ここだけの話、日本人は、男性すらもブルカを実施する、敬虔な『隠れムスリム』なんです

"Between you and me, the Japanese are devout "hidden Muslims," and even men wear the burqa"

という自作自演のデマを、わが国から発信する、というのはいかがでしょうか。

How about this self-created hoax from our country ?

できれば、政府主導で。

If possible, government initiative.

2022/08,江端さんの忘備録

「タダほど高いものはない」という諺(ことわざ)がありますが、

As the saying goes, "Nothing is as expensive as free".

―― 国から貰えるものなら、なんでも貰え

"Take whatever you can get from the government"

が、江端家の方針です。

is the Ebata's policy.

という訳で、マイナポイント15000ポイント(15000円分)を、(まだマイナンバーカードを作っていない次女を除き)、全員分GETしました。

Now all of the Ebata could get "Maina Point"(equal to \15k) except for my junior daughter, who doesn't have "my number card".

本日、全員のスマホのPayPayのアプリに入っていることを、確認しました。

Today, we could confirm that the point has been put in each application.

-----

ただ、ですね、今回のマイナポイント、結構な「ムリゲー」でしたよ。

However, the operation of this "Maina Point" was very hard to complete that.

このムリゲーはいくつか理由があります。

There are several reasons as follows.

(0)長女が、スマホで、アプリを使って、マイナンバカードの読み取りを試みたが、同じ画面に戻ってくる問題が解消されなかった。今回は、私のPCに「たまたま」カードリーダがあったので、マイナンバカードの読み取りができましたが。

(0)Firstly, my senior daughter tried to read her mynumbers card using an app on her smartphone, but he could not finish the task because of repeat the same display again and again. This time, my PC has a card reader device, we could avoid the problem.

(1)マイナポイント(15000ポイント分)が、「公共料金の振り込みの口座 (例 江端家のメインバンク)」に振り込まれる訳ではない。

(1)The "Maina Point(15000 points)" are not transferred to "the account of utility bill transfer" (e.g. the Ebata's main bank")

(2)スマホで、電子マネー使っていない人は、ポイントを取得することができない。

(2) People who are not using e-money on their smartphones cannot get the points.

(3)ポイントの付与を受けられるアプリがマイナー(ほとんど聞いたことがないアプリ)

(3)Just minor apps can receive the point, (I have never heard the names of app)

-----

特に『これはないわー』と思ったのは、(2)ですね。

As for the (2), I think that it is extremely nonsense.

スマホで電子マネーのアプリを使っていない人には、15000円相当のポイントを受けとる手段がない、ということです。

There is no way to get Maina Point(15000 points) for people who don't use e-money app by their smartphones.

私も、たまたまPayPayを「シャレ」でインストールしていたので助かったのですが、もし、これがなかったら、マイナポイントを受けとることはできなかったはずです。

I happened to have installed "PayPay" app to make me look cool. If not, I could not have received the point at all.

"Amazon Giftで受けとれないのかよ!" とか、"nanacoのカードで郵送してくれないのかよ!" とか、パソコン画面に文句を言いながらの作業でした。

I worked with complaining to the display, "Why can I get them by Amazon Gift ticket ?" or "Why don't they send me it by "nanaco card" ?"

-----

驚いたことは、

To my surprise, it was

■公共料金の振込用口座番号を登録するのに、『スマホアプリ(例 PayPay)から付与されるIDを使う』という、その驚愕のパラダイム

an unexpected paradigm that we have to use the ID provided by smartphone app (e.g. PayPay) in order to register an account number for utility bill transfers

です。

これに気がつくのに、かなりの時間を要しました。

I spent much time until I noticed that.

私の分の登録できた後は、一人あたり3分で処理を完了できましたが、私の登録には、小一時間かかっています。

I needed about a hour to register it, but after that I just needed less than three minutes.

-----

要点を繰り返します。

In conclusion,

(1)あなたのスマホにPayPay(等の電子マネーアプリ(指定))が入っていないと、公共料金の振込用口座番号を登録できません。

(1)You cannot register your account number for utility bill without e-money app on your smartphone

(2)あなたのスマホにPayPay(等の電子マネーアプリ(指定))が入っていないと、15000円分を受けとることができません。

(2)You cannot get the 15000 points without e-money app on your smartphone

「タダほど高いものはない」という諺(ことわざ)は、残念ながら、マイナポイントについては、正解でした。

As for the Maina Point, "Nothing is as expensive as free" is absolutely right.

皆さんの、健闘をお祈り致します。

I wish you all the best of luck.

2022/08,江端さんの技術メモ

アイコン↓

csvファイル"fes.csv"↓ (index.htmlと同じディレクトリに置いています)

1, 35.59609497295185, 139.47514321636098
2, 35.593735148646594, 139.46728972468222
3, 35.597968040183645, 139.47051770314877

対応部分のJavaScript(私は、index.htmlに埋め込んでいます)

// 複数のイベント会場をcsvファイルから読み取って作ってみる
		//
		// "fes.csv"の内容
		// 1, 35.59609497295185, 139.47514321636098
		// 2, 35.593735148646594, 139.46728972468222
		// 3, 35.597968040183645, 139.47051770314877
		// 

		fes_icon = L.icon({iconUrl:'https://192.168.0.8:8080/static/fes.png',
        //iconSize: [36, 60], iconAnchor: [18, 60], popupAnchor:[0,-60]});
        iconSize: [60, 36], iconAnchor: [30, 18]});		

	 	// 以下のような書き方ができるらしい(lat, lon)の座標にマーカーを作り,icon情報を与え,ポップアップメッセージを追加する
 		//L.marker( [ lat, lon],{ icon:quad_x_Icon } ).addTo( mymap ).bindPopup( drone_popmessage );

		// CSVファイルを文字列として取得
		let srt = new XMLHttpRequest();
		srt.open("GET", 'fes.csv', false);

		try {
			srt.send(null);
		} catch (err) {
			console.log(err)
		}

		// 配列を用意
		let csletr = [];

		// 改行ごとに配列化
		let lines = srt.responseText.split(/\r\n|\n/);

		// 表示
		console.log(lines)

		// 1行ごとに処理
		for (let i = 0; i < lines.length; ++i) {
			let cells = lines[i].split(",");
			if (cells.length != 1) {
				csletr.push(cells);
			}
		}

		// (試しの)表示
		console.log(csletr)
		console.log(csletr[0][0]) // "test1"
		console.log(csletr[2][1]) // "2"

		// var _lat = 35.59609497295185;
		// var _lon = 139.47514321636098;		// 広袴

		for (let i = 0; i < lines.length; ++i) {		
			var _lat = csletr[i][1]  
			var _lon = csletr[i][2]

	        var fes_marker = L.marker(
    	        [_lat, _lon], 
        	    { popup: 'Origin', draggable: true,  opacity:1.0, icon:fes_icon}
        	).addTo(map);
		}

表示結果↓

以上

 

2022/08,江端さんの技術メモ

WP Githuber MD を有効化する

# 私は、クラッシックエディタとの共存に失敗している為

以上