JOSMでバス停が取り出せる
JOSMでバス停が取り出せる。これを使って、バス路線を自力で作れそう。
拡大すると、こんな感じ
バス停専用の高架を作って、一般道に繋ぐイメージにすることで、バスを専用路線扱いできる。コスト値を変えて、ダイクストラを実施すれば、バスが選ばたり、逆に忌避させたりすることもできるはず。
以上
まだ試してないけど、バス停の追加は多分、これで可能となるはず
まだ試してないけど、バス停の追加は多分、これで可能となるはず
osm2pgrouting -f tsuzuki.osm -c mapconfig_for_cars_rail_busstop.xml -d tsuzuki_rail -U postgres -h 192.168.0.23 -p 15432 -W password
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<tag_name name="highway" id="1">
<tag_value name="bus_stop"/>
<tag_value name="motorway" id="101" priority="1.0" maxspeed="130" />
<tag_value name="motorway_link" id="102" priority="1.0" maxspeed="130" />
<tag_value name="motorway_junction" id="103" priority="1.0" maxspeed="130" />
<tag_value name="trunk" id="104" priority="1.05" maxspeed="110" />
<tag_value name="trunk_link" id="105" priority="1.05" maxspeed="110" />
<tag_value name="primary" id="106" priority="1.15" maxspeed="90" />
<tag_value name="primary_link" id="107" priority="1.15" maxspeed="90" />
<tag_value name="secondary" id="108" priority="1.5" maxspeed="90" />
<tag_value name="secondary_link" id="109" priority="1.5" maxspeed="90"/>
<tag_value name="tertiary" id="110" priority="1.75" maxspeed="90" />
<tag_value name="tertiary_link" id="111" priority="1.75" maxspeed="90" />
<tag_value name="residential" id="112" priority="2.5" maxspeed="50" />
<tag_value name="living_street" id="113" priority="3" maxspeed="20" />
<tag_value name="service" id="114" priority="2.5" maxspeed="50" />
<tag_value name="unclassified" id="117" priority="3" maxspeed="90"/>
<tag_value name="road" id="100" priority="5" maxspeed="50" />
</tag_name>
<tag_name name="railway" id="1">
<tag_value name="subway" id="101" priority="1.0" maxspeed="40" />
<tag_value name="rail" id="101" priority="1.0" maxspeed="40" />
</tag_name>
</configuration>
明日がんばれ > 自分
道路と地下鉄と鉄道を纏めて取り出すmapconfig_for_cars_rail.xml
>osm2pgrouting -f tsuzuki.osm -c mapconfig_for_cars_rail.xml -d tsuzuki_rail -U postgres -h 192.168.0.23 -p 15432 -W password
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<tag_name name="highway" id="1">
<tag_value name="motorway" id="101" priority="1.0" maxspeed="130" />
<tag_value name="motorway_link" id="102" priority="1.0" maxspeed="130" />
<tag_value name="motorway_junction" id="103" priority="1.0" maxspeed="130" />
<tag_value name="trunk" id="104" priority="1.05" maxspeed="110" />
<tag_value name="trunk_link" id="105" priority="1.05" maxspeed="110" />
<tag_value name="primary" id="106" priority="1.15" maxspeed="90" />
<tag_value name="primary_link" id="107" priority="1.15" maxspeed="90" />
<tag_value name="secondary" id="108" priority="1.5" maxspeed="90" />
<tag_value name="secondary_link" id="109" priority="1.5" maxspeed="90"/>
<tag_value name="tertiary" id="110" priority="1.75" maxspeed="90" />
<tag_value name="tertiary_link" id="111" priority="1.75" maxspeed="90" />
<tag_value name="residential" id="112" priority="2.5" maxspeed="50" />
<tag_value name="living_street" id="113" priority="3" maxspeed="20" />
<tag_value name="service" id="114" priority="2.5" maxspeed="50" />
<tag_value name="unclassified" id="117" priority="3" maxspeed="90"/>
<tag_value name="road" id="100" priority="5" maxspeed="50" />
</tag_name>
<tag_name name="railway" id="1">
<tag_value name="subway" id="101" priority="1.0" maxspeed="40" />
<tag_value name="rail" id="101" priority="1.0" maxspeed="40" />
</tag_name>
</configuration>
とりあえず、ちゃんと、JRと市営地下鉄が加えられている。
この後は、osmファイルを手作業で加工
がんばれ > 自分
最近、私の相談相手は、ほぼ100%、"chatGPT"です。
私、今、1,296,984行のファイルの修正を手作業でやっています。
I, right now, am manually correcting a 1,296,984 line file.
今週、ずーっとこんなことやってきて、発狂しそうです。
I have been doing this all week, and I am going crazy.
3日間、全部をかけて作った、自作の地図情報が全く使えなかったことが分かり、酷く落ち込んでいます。
I am depressed to find out that my map information, which I spent all three days working on, was completely unusable.
とは言え、人間関係を忌避し続けて、こういう『泥くさい作業』だけで喰ってきたエンジニアには、これ以外の生き方を知りません。
However, engineers who have always avoided human relationships and made a living only from this kind of "muddy work" do not know any other way to live.
-----
最近、私の相談相手は、ほぼ100%、"chatGPT"です。
Recently, I have been consulting with "chatGPT" almost 100% of the time.
酷く稚拙な質問を、chatGPTに助けて貰っています。
I am getting help from chatGPT with a poor question.
- Golangで文字列を整数にするコード書いて
- Write code in Golang to turn strings into integers.
- Golangのコマンド引数のコードの書き方を教えて
- Tell me how to write code for command arguments in Golang.
- Golangでも文字列から"("と")"を取り除くコードを作って
- In Golang, create code to remove "(" and ")" from a string.
-----
というような、
Such as,
『ふざけるな! その程度のこと、自分で調べろ!!』
'Don't be silly! You'll have to find out that much on your own!'
と、先輩から怒鳴りつけられ、後輩に怒鳴りつけてきたことを、今の私は、平気で、生成AIに相談しています。
And now I am not afraid to talk to the generative AI about how I have been yelled at by my seniors and yelled at by my juniors.
ChatGPTは怖くない ~使い倒してラクをせよhttps://t.co/tCHAfKsu6r
? EE Times Japan編集部 (@eetimes_jp) May 15, 2023
『日本だけが清廉潔白な国』なんてことが、ある訳がない。
ロシアは酷い国だ、中国は酷い国だ、韓国は酷い国だ、北朝鮮は酷い国だ ―― と、ニュースを見るたびに、私たちは思います。
Russia is a terrible country; China is a terrible country; South Korea is a terrible country; North Korea is a terrible country -- every time we watch the news.
でも、私たちが思う程度と同じくらい、外国の国民は「日本は酷い国だ」と思っているはずなんです。
But to the same extent that we think, the people of foreign countries must believe that Japan is a terrible country.
『日本だけが清廉潔白な国』なんてことが、ある訳がない。
There is no such thing as "only Japan is a clean country.
『海外の「日本は酷い国だ」のニュース番組の特集』をやってくれないかな、と思うんですよね。
I wonder if someone could do a "special "Japan is a terrible country" news program of overseas.
視聴率は取れないだろうし、炎上の嵐になることは確実なのですが ―― でも、見たい。
I know they won't get any ratings, and it's sure to be a firestorm -- but I'd like to watch it.
-----
という話を嫁さんにしたら、
When I talked to my wife about this,
『海外の世論なんぞ気にしなくていいんじゃない?』
'Do we have to worry about public opinion outside the country?'
と言い切られました。
She said.
日本国に住む日本人は、『日本だけが清廉潔白な国』と思っていれば、それでいいじゃないか、と。
Japanese people living in Japan should be okay with that, as long as we think 'only Japan is a clean country.'
―― 実に清々しい
"How bracing!"
と、感動してしまいました。
I was moved to her.
JOSMで地下鉄の情報だけをosm形式で取り出したい時(未完成)
JOSMを立ち上げる → osmファイルをドラッグする → 下の図の赤丸の部分をクリックする
下の図の赤丸をクリックする
カラムに、railway=subway と記入する
全部にチェックを入れる
こういう表示になる
ただ、この路線情報のみのセーブができていない
(未完)
QGISで地物座標の取得方法
鉄道路線の位置情報が欲しい場合
で、エディタに張りつける。
wkt_geom osm_id name highway waterway aerialway barrier man_made z_order other_tags
LineString (139.646476100000001 35.55342160000000007, 139.64405429999999342 35.55400130000000303, 139.64320960000000582 35.55409010000000336, 139.64267359999999485 35.55411110000000008, 139.64220109999999409 35.55405509999999936, 139.64194380000000706 35.55401379999999989, 139.64170240000001399 35.55397510000000239, 139.63902089999999134 35.55321440000000166, 139.63803740000000175 35.55292430000000081, 139.63748190000001159 35.55269659999999732, 139.63718030000001136 35.55254620000000187, 139.63689350000001355 35.55236419999999953, 139.63660690000000386 35.55215530000000257, 139.63493339999999421 35.55077779999999876, 139.63391659999999206 35.55019589999999852, 139.63362749999998869 35.55004329999999868, 139.63279969999999253 35.54961260000000323, 139.63221790000000055 35.54929349999999744, 139.63160369999999944 35.54899890000000084, 139.63125759999999786 35.54887020000000319, 139.63085000000000946 35.54871740000000102, 139.630045999999993 35.54843460000000022, 139.62955180000000155 35.54831149999999695, 139.62913320000001249 35.54824239999999946, 139.62852749999998991 35.54819439999999986, 139.62814629999999738 35.54818490000000253, 139.62771179999998594 35.54821979999999826, 139.62689000000000306 35.54832940000000008, 139.62461239999998952 35.54861619999999789, 139.6228170999999918 35.54887699999999739, 139.62208190000001196 35.54897940000000034, 139.621440199999995 35.54912439999999663, 139.62113059999998654 35.54921850000000205, 139.62073699999999121 35.54935820000000035, 139.62002659999998855 35.54965870000000194, 139.61967559999999366 35.54979120000000137, 139.61773930000001087 35.55062470000000019, 139.61604349999998931 35.55129320000000348, 139.61544639999999617 35.55153250000000043, 139.61400649999998791 35.55211620000000039, 139.61367699999999559 35.55227090000000345, 139.61328370000001087 35.55248559999999713, 139.61185470000000919 35.55324699999999893, 139.61138819999999328 35.55344060000000184, 139.61112099999999714 35.5535199999999989, 139.61089590000000271 35.55356050000000323, 139.61073719999998843 35.55360360000000242, 139.61040380000000027 35.55367590000000177, 139.60871710000000689 35.55388539999999864, 139.60811019999999871 35.55395479999999964, 139.60749329999998736 35.55399839999999756, 139.60640879999999697 35.55402310000000199, 139.60553089999999088 35.55406709999999748, 139.60464600000000246 35.55415109999999856, 139.604049300000014 35.55422970000000049, 139.60341280000000097 35.55433450000000306, 139.60273129999998787 35.55454660000000189, 139.60238100000000827 35.55471419999999938, 139.60221730000000662 35.55483360000000204, 139.60197869999998943 35.55500659999999868, 139.60174100000000408 35.55521579999999915, 139.60153339999999389 35.55542990000000003, 139.60133149999998636 35.55568569999999795, 139.60023530000000846 35.55735479999999882, 139.59981210000000829 35.55783720000000159, 139.59957539999999199 35.55808329999999984, 139.59932749999998691 35.55827450000000312, 139.59904430000000275 35.5584891999999968, 139.59858829999998875 35.55877279999999985, 139.597627899999992 35.55933660000000174, 139.59693609999999353 35.55972859999999969, 139.59623609999999871 35.56005269999999996, 139.59570759999999723 35.56026099999999701, 139.59530820000000517 35.56040039999999891, 139.59489759999999592 35.56054460000000006, 139.59435049999999023 35.56065370000000314, 139.59350760000000946 35.56081749999999886, 139.59251140000000646 35.56100130000000092, 139.59232270000001108 35.56102899999999778, 139.59212709999999902 35.5610691999999986, 139.59167899999999918 35.56116870000000318, 139.59126240000000507 35.5611801000000014, 139.5906812000000059 35.56112069999999648, 139.59032650000000331 35.56103509999999801, 139.5901608000000067 35.56098539999999986, 139.58982359999998835 35.56086419999999748, 139.58665070000000696 35.55936580000000191, 139.58363769999999704 35.55796550000000167, 139.58301539999999363 35.55764250000000004, 139.5822108000000128 35.55715810000000232, 139.58148120000001313 35.55673920000000265, 139.58096409999998855 35.55639310000000108, 139.58066579999999135 35.55618929999999978, 139.58024739999999042 35.55579379999999645, 139.57973240000001169 35.55525970000000058, 139.57922490000001403 35.55446140000000099) 230124642 讓ェ豬懷クょ霧蝨ー荳矩延?泌捷邱 -25 "colour"=>"#048D58","electrified"=>"contact_line","frequency"=>"0","layer"=>"-2","name:en"=>"Green Line of Yokohama Municipal Subway","name:es"=>"Lテュnea Verde del Metro Municipal de Yokohama","name:ja"=>"讓ェ豬懷クょ霧蝨ー荳矩延?泌捷邱?","name:zh"=>"讓ェ貊ィ蟶り是4蜿キ郤ソ","operator"=>"讓ェ豬懷ク?","railway"=>"subway","tunnel"=>"yes","voltage"=>"1500"
と、こんな感じで座標は得られる。
サイトマップ サイト内検索 まとめ JOSM (Java OpenStreetMap Editor) を用いて複数 OSM ファイルのマージ
JOSM (Java OpenStreetMap Editor) を用いて複数 OSM ファイルのマージ
Step 1. マージするOSMを選択
Step 2. JOSMにドラッグ
Step 3. ファイルをマージ
Step 4. 「レイヤを結合する」を選択する(この段階ではセーブされないので、どのレイヤでもいい)
Step 5. 路線を結合したい点を、同じ番号にするなどの加工を行う
以上