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

utsu_tram_db=# select * from ways where source =0
;
gid | osm_id | tag_id | length | length_m | name | source | target | source_osm | target_osm | cost | reverse_cost | cost_s | reverse_cost_s | rule | one_way | oneway | x1 | y1 | x2 | y2 | maxspeed_forward | maxspeed_backward | priority
| the_geom

gid | osm_id | tag_id | length | length_m | name |

source: 始点ノードの識別子

target : 始点ノードの識別子

| source_osm | target_osm |

costcost : エッジにかかる重み(負の重みは、エッジがグラフに挿入されるのを防ぎます)

reverse_cost: エッジの反対方向のためのコスト。

| cost_s | reverse_cost_s | rule | one_way | oneway |

x1 : エッジの始点のx座標

y1 : エッジの始点のy座標

x2 : エッジの終点のx座標

y2 : エッジの終点のy座標

| maxspeed_forward | maxspeed_backward | priority
| the_geom

 

・id : エッジの識別子 [int4] ・・・・source : 始点ノードの識別子 [int4] ・・・・target : 終点ノードの識別子 [int4] ・・・・cost : エッジにかかる重み(負の重みは、エッジがグラフに挿入されるのを防ぎます)。 [float8] ・・・・reverse_cost(オプション) : エッジの反対方向のためのコスト。

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

以前、何度かアニメ「氷菓」の話をしました。

Previously, I often told the animation "Hyouka".

私なりの「氷菓」シリーズの解釈は、

What I understand the contents of "Hyouka" series, are

(1)『努力は天才に勝てない』と

(1) "Hard work is no match for genius."

(2)『天才は幸せではない』という、

(2) "Genius is not happy".

私がティーンの時代の言語化できなかった事実を、等身大の若者たちの姿で、納得できる描写で描いている点にあります。

This animation show us the above realties that I had not reached in my teenager, appearing life-size young people.

-----

その続編となる米澤 穂信さんの小説「いまさら翼といわれても」についても、何度も書きましたが、今、改めて読み直しています。

I often wrote about the sequel novel "Even if you give me my wings now", by Honobu Yonezawa, and I am reading it again now.

こちらでは、上記(1)(2)のテーゼに加えて、『高校の部活動の無意味さ』についても記載されています。

In this novel, 'insignificance of high school club activities' are described, in addition to the above (1) and (2) themes.

友人同士で派閥を作り、目標もなく、ただ時間を消費し続けるだけの高校の部活動について、厳しい批判と思われる短編が登場します。

There is a story that is a harsh criticism of high school activities that has no purpose, waste time and just make factions with friends.

比して、そのような部活動などに目もくれずに、ハイスクールに入る前から、自分のできること、好きなことのみに注力し、今や、世界を動かしている、2大オペレーティングシステムの礎を作った人たちもいます。

In comparison with, there are persons who completed two world-wide computer operating systems. Even before entering high school, they focused on what they did and what they wanted, without paying attention to such club activities, etc.

もちろん、そのような「成功体験」がある例はレアなケースですし ―― ぶっちゃけ「成功」なんてどうでもいいのです。

Of course I know such "success experiments" are rare. Moreover I don't care about "success" to be frank,

あの高校時代の時間を、もっと『狂ったように過す』ことはできたと思います ―― 友人という名のグループに安住して、無為な時間を浪費することなく。

I think I could have spent the time for 'going crazy' during those high school years.

つまり「昔の私」です。

In other words, "It was me as young".

-----

もっとも、私を含む多くの凡庸な人間にとって、このような「狂ったように過す」ことのできる対象に巡り合うことは難しいです。

However, for many people including me, it is difficult to find such an object of "going crazy".

加えて、ティーンの共通の"貨幣"が、"友人"という奇妙なものであるからです。

In addition, the common "currency" of teenager is a strange thing that called "friends".

そして、彼等は、その"貨幣"の多少、つまり"友人数"という価値の呪縛から逃れられないからです。

And they cannot escape from the spell of the value of "currency", called "numbers of friends".

この"友人"という名の"貨幣"は、ティーンの時代を越えても、価値あるものと見なされることがあります。

The "currency" called "friend" is often treated to be valuable beyond the teenager.

-----

来週リリースされるコラムでは、この"友人"という名の"貨幣"について論じる予定です。

In the column of this month, I will argue the "currency", called "friends"

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

JSONで、芳賀・宇都宮LRTの路線と一般道を、停車駅の単位で接続して、LRTを道路扱いする方法にしてみました。

で、昨日の実験結果の方法

街の中に道路を作って、ダイクストラ計算ができるか試してみた件 ―― JOSMを使った道路追加の方法を試す

を使って、utsunomiya-lrt-latest-1-no_modify.osmを手動で作成しました。

そんで、もって、

OpenStreetMapから、鉄道情報(芳賀・宇都宮LRT)を引き出して、ダイクストラ計算やってみました。

を使って、道路とLRTのみのDBを作りました。

root@a2b2f7061d88:~# osm2pgrouting -f /utsu_db/utsunomiya-lrt-latest-1-no_modify.osm -c /utsu_db/mapconfig_for_cars_tram.xml -d utsu_tram_db -U postgres

これで、私は、LRTの架橋を使って、「さあ、道から乗って、LRTに乗って、橋を渡って、道に下りられるか?」を試してみます。

ターゲットとしたノードは、駅近くを選びました。

では始点の方を拡大します。

ダイクストラ計算の結果

postgres=# \c utsu_tram_db
You are now connected to database "utsu_tram_db" as user "postgres".
utsu_tram_db=# SELECT seq, node, edge, cost, agg_cost FROM pgr_dijkstra('SELECT gid as id, source, target,length_m as cost FROM ways',14779, 14266, false);
seq | node | edge | cost | agg_cost
-----+-------+-------+--------------------+--------------------
1 | 14779 | 42200 | 42.785394484227744 | 0
2 | 34 | 19785 | 7.618791492678159 | 42.785394484227744
3 | 35 | 48595 | 389.45546677917343 | 50.4041859769059
4 | 42701 | 59452 | 12.262652109536079 | 439.85965275607936
5 | 42982 | 59725 | 270.535671188774 | 452.12230486561543
6 | 42176 | 58890 | 215.43378099396782 | 722.6579760543895
7 | 42004 | 58695 | 620.3511502405348 | 938.0917570483573
8 | 42005 | 58696 | 199.48206530565716 | 1558.442907288892
9 | 42017 | 58710 | 162.9099908343982 | 1757.9249725945492
10 | 33448 | 48969 | 102.43865451629547 | 1920.8349634289475
11 | 14266 | -1 | 0 | 2023.273617945243
(11 rows)

QGISで書いてみたら、こうなった

あれ、LRTの架橋を通っていないぞ。これ前にも見たことがあるな。これかな

postGISのpgr_dijkstra()を試しているけど、理解できない現象が発生している件

 

revese_costを入れたら、ちゃんとLRT架橋を通過しました

よし、これで、道路と鉄道の強制マージに目処が付きました。

ちなみに、OpenStreetMapに実装されていなかった部分を、JSONで道路工事をした結果、ちゃんと開通していることを確認しました。

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

―― ノードの座標情報が記載されていなければ、JOSMに地図が表示される訳ないやん?

"Without the information of latitude and longitude described in the script, even the JOSM cannot display the additional map information"

と、寝ている最中に気がついて、目が覚めてしまい、本日は不眠で体がだるいです。

This morning I noticed the above and waked up, and I feel tired all day.

この↓の話です。

This is the story.

街の中に道路を作って、ダイクストラ計算ができるか試してみた件 ―― JOSMを使った道路追加の方法を試す

朝方に、夢の中のネタで起こされるのは、コーディング、特許明細書などをガリガリ書いている時に多いです。

This happening is likely to happen in my dream early morning, when I concentrate coding or patent writing.

-----

今日、午前中に、電子地図(OpenStreetMap)の、ローカルの改竄に成功して、ちょっと気分がいいです。

Today, before noon, I succeeded a falsification of digital map (Open Street Map).

こんな時は、勢いにのって、本番の地図にも手を出すと、作業が早いのですが ――

In time like this, building on the momentum, I know that I have to deal with the target map, as soon as possible, however,

次のフェーズに入ると別の問題が発生することは分かっています。

I know that another problem happens easily in the next step.

ですから『今日は気分の良いまま、今日という日を終えたい』です。

Therefore, "I want to end today, with feeling good."

が、まあ、そんな甘えたことは言ってられませんので、多分、今晩も頭を抱えることになるのでしょう。

However, I know that I cannot be so picky. So some problems will annoy me in this night too.

で、また明日の朝、『楽しくもない夢に叩き起こされる』、と。

And tomorrow's morning, I will be waken up by a nightmare.

-----

『不毛だ』と思いますが、エンジニアの日常って、こんなものですよね。

I think it is meaningless, however, this is a typical engineer's life.

それとも、私だけ?

Or is it just me?

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

JOSMのノードの追加は、「上級者モード」にならないと、メニューが出てきません。

とすると、メニューが見えるようになります。

この理由は、比較的、推測しやすいです。

もし間違って、このようなデタラメな地図が、OpenStreetMapの方に反映されるようなことになれば(アップロードされれば)、世界中の地図がメチャクチャになる、からです。

今、私がやっていることは、自分のシミュレータ用に都合よく地図を改竄(かいざん)していることですから、

ですから、間違っても、この改竄した地図をアップロードしないことに注意しなければなりません。

故に、「上級者モード」ということ ―― なんだろうなぁ、と思っています。

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

私は、ずっとヒラの研究員です。

I've been a flat researcher of a company for a long time.

ですので、基本的に、強い発言力がありません。

So basically, I do not have a strong voice.

以前、とある制御システムについての提案をしたのですが、不採用となりました。

Previously, I propose about a control system, but it was rejected.

その2年後に、「採用されたシステム」がコケました。

However, the "accepted system" was down two years later.

(これは、たまたま、です。私も結構な頻度で、予想を外します)。

(This happened by change. I also miss predictions quite often)

ただ、その時に、その事を、後輩から叱責されたことがあります。

At that time, I was accused of that thing from a junior colleague.

『江端さんの、出世に対する無関心が、このような事態を招いたのです』

"This tragedy occurred because of an indifference about your promotion"

と。

-----

「権力とか名声とかに無欲であることは、美徳である」という思い込みを持っていた私は、ブン殴られたようなショックを受けたのを覚えています。

I remember that I was pretty shocked to hear his opinion, because I believe that "being selfless against power and prestige is a virtue."

この世の中には、『責務としての出世』という考え方があるようです。

There seems to be a thought of "promotion as a duty" in the world.

皆さんは、後輩に迷惑をかけない程度に、出世するようにして下さい

You all should try to promote, avoiding troubles for your juniors.

私は「もう手遅れ」ということで、免責として下さい。

I am "too late" for this, so please excuse me.

未分類

ロードするビデオクリップはmp4として、映像出力と出力形式を、mp4に合わせる

mp4をドラッグする。

ざっくり3倍にしてみる。

あとは保存すればできあがり。

 

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

いつまでも、昔の思い出を語り続けるようで、少々情けないとは思うのですが ――

It is shameful to talk about good old days eternally,however,

京都が出てくるアニメやコミックには、どうしても嵌(はま)ってしまいますね。

comics and animations whose stage is Kyoto is going to make me get stuck in.

今は、「であいもん」というコミックを読んでいます。

Now I am reading "Deaimon (good foods combination)".

-----

四条河原町とか三条あたりは、どうということもないのです。

I am not so interested in the Shijo Kawaramachi and Sanjo.

しかし、叡電(叡山電車)の駅、出町柳、修学院、宝が池あたりが出てくると、もう、頭の中が30年前に一瞬でワープしてしまいます。

However, whenever I watch the pictures of Eiden (Eizan Railway) stations, Demachiyanagi, Shugakuin, Takaraga Ike, my mind has already instantly warped to 30 years ago.

まあ、人生で、あれほど幸せな時代(死ぬほどバイトして、死ぬほど勉強した)はなかったですから。

I never had such a happy time in my life( I worked part-time to death, and studied to death).

叡電の停車駅では、これ以外では、修学院(これは、アニメ「けいおん」で出てきました)が出てくるくらいですね。

In Eiden line, we cannot hear the name of station, except for Shugakuin (which appear in the Anime "K-ON") and the above.

-----

―― なんで、「岩倉」がでてこんのや

Why not "Iwakura"

と思う。

I think.

宝が池を越えると、もう、貴船、鞍馬まで、駅名は出てきません。

Once over Takaragaike, we cannot see station name, until Kifune, Kurama.

-----

嫁さん:「岩倉って、何かあったっけ?」

Wife:"What is in Iwakura?"

江端:「岩倉具視の旧宅がある」

Ebata:"There is the former residence of Iwakura Tomomi"

嫁さん:「その家で何してたん?」

Wife:"What was he doing in the house?"

江端:「当時、要職から干されてゴロゴロしていかなぁ。時々、反体制の若いやつら(幕末の志士)が出入りしていたとか、しないとか」

Ebata: "He was deprived of any chance to appear in the Imperial Palace, and young anti-establishment guys had seems in and out"

嫁さん:「ウリが弱いなぁ」

Wife:"It is weak"

-----

岩倉駅を有名にさせる為には、岩倉具視を主人公にした、新しいコンテンツの登場が必要かと思います。

In order to make Iwakura Station famous, I think it is necessary to introduce new content featuring Iwakura Tomomi.

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

「三角関数」で、また、誰か何かやった(やらかした)ようですね。

I thin that someone do or say something about "trigonometric function".

2年前にリリースした、

Two years ago, my released column,

「リカレント教育【前編】 三角関数不要論と個性の壊し方」

"Recurrent Education [the former half]: The trigonometric function unnecessary theory and the Destruction of Individuality"

がランクインしていて、ビックリしました。

is now ranked in, so I was surprised.

多分、この『三角関数 要/不要』の論争は、これから何度も登場するでしょう。

Probability, this argument of "The trigonometric function unnecessary theory" will often be happened in the future.

でも、実は、こちらよりも、後編の

However, rather than the above column, in the latter half,

「リカレント教育とは、“キャリア放棄時代”で生き残るための「指南書」であるべきだ」

"Recurrent education should be a "guidebook" for survival in the age of career abandonment".

の方で、さらに、ハードな意見を展開しています。

I have argued hard opinions of mine like following,

―― いろいろ言っているけど、要するにお前ら、三角関数が嫌いなだけだろ……!

"You say a lot of things, but the bottom line is that you guys just hate trigonometric functions: ..!"

-----

ご興味のある方は、ご一読下さい。

Please read on if you are interested.