Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
look_for_shade
Search
yrarchi
June 18, 2019
Technology
430
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
look_for_shade
yrarchi
June 18, 2019
More Decks by yrarchi
See All by yrarchi
Notionを活用した学習管理
yrarchi
0
98
「やりたいこと」駆動で学ぼう
yrarchi
0
210
Other Decks in Technology
See All in Technology
消えない 動かない 効かない
yama3133
1
120
OpenTelemetryのメトリクスをCloudWatchに送ってPromQLで見てみた
ota1022
0
140
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
180
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
150
SREは、MCPとAutopilotをこう使え!
kazumax55
2
530
Podは生きているのにGoだけが落ちる:GOGCとGOMEMLIMITで追うInvisible OOM Killの謎
tkc66buzz
1
690
AI時代の「技術的負債」の変質ー概念の終焉と再解釈、エージェントと共に向かう先
nwiizo
0
1.4k
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
3
430
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
1.3k
あるけみー式LTスライド作成術
alchemy1115
1
210
GoにおけるFFIのこれまでとこれから
goccy
5
2.6k
AI時代のAPI品質を支えるガードレール / API Guardrails for API quality in the AI era
yokawasa
1
250
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
The Limits of Empathy - UXLibs8
cassininazir
1
660
HDC tutorial
michielstock
2
860
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
600
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
490
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
230
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
500
Believing is Seeing
oripsolob
1
220
Game over? The fight for quality and originality in the time of robots
wayneb77
1
270
Transcript
look for shade Pythonを用いた日影の計算 PyData.Fukuoka Meetup #4 2019/06/18 yrarchi
今回のテーマ もうすぐ、暑い夏がやってくる! 少しでも、日陰を歩きたい… どの道を通ると 日陰が多いんだろう? 何時に出かけると 日陰が多いんだろう? 道路の何%が日陰になるか、Pythonで計算してみよう!
日影のできかたを決める要素は何か? - 緯度・経度:福岡市 (福岡県庁の緯度経度を 使用) - 日付:夏至(2019/6/22) -
時間:日の出〜日の入まで15分ごと に変えて計算
道路にかかる影の割合を決める要素は何か? - 建物形状・高さ:6.0m * 6.0m * 6.0m - 道路幅員:4.0m
- 道路からの離れ・隣棟間隔:1.0m - 道路の方位角:22.5°ずつ変えて計算
道路にかかる影の割合を決める要素は何か? - 建物形状・高さ:6.0m * 6.0m * 6.0m - 道路幅員:4.0m
- 道路からの離れ・隣棟間隔:1.0m - 道路の方位角:22.5°ずつ変えて計算
計算過程_1 ①モデル建物画像 読込み ②モデル画像回転 ③建物の輪郭を検出 ↓ コーナーの座標を 求める import cv2
model = cv2.imread("img/model.png") … for angle in [angle/10 for angle in range(0, 1800, 225)]: img = rotate_img(angle, model) … contours = find_contours() approx_contours = approximate_contours() … 画像処理を行うライブラリ OpenCVを利用
⑥道路のうち、影と 重なる割合を求める ⑤影の座標を求める 計算過程_2 ④諸条件より太陽の 方位角・高度を出す def calc_coordinate_of_shade(): h =
calc_solar_altitude() A = calc_azimuth() shade_longth = bldg_h_pixel / math.tan(h) shade_x = shade_longth * math.sin(A) * -1 shade_y = shade_longth * math.cos(A) * -1 return shade_x, shade_y … for time in [i / 100 for i in range(500, 2000, 25)]: … shade_x, shade_y = calc_coordinate_of_shade() shade_msk, hull_points = make_shade_mask() road_shade_per = calc_per_of_shade_on_road() …
結果 日の出 日の入り 南中時刻 0° 45° 90°
実際の道路で求めてみる_1 天神駅 福岡県庁 道路の方位角を取得して、経路上の影の割合を出してみる import osmnx as ox import networkx
as nx G = ox.graph_from_point((latitude, longitude), distance=1800, network_type="walk") … origin_node = ox.get_nearest_node(G, origin_point) destination_node = ox.get_nearest_node(G, destination_point) route = nx.shortest_path(G, origin_node, destination_node, weight="length") … G = ox.add_edge_bearings(G) bearings = pd.Series(ox.get_route_edge_attributes(G, route, "bearing")) … OpenStreetMapのデータを利用して街路網の計算を行えるOSMnxを 利用
実際の道路で求めてみる_2 例えば、16時に出かければ 道路の80%超は日陰に なっている (※ 経路上の建物が全て モデル通りならば!)
まとめ 今回できたこと: - モデル建物における道路を占める影の割合 の算出 課題: - 実際の建物の形状・高さを用いた計算 資料: https://github.com/yrarchi/look_for_shade https://yrarchi.net/look_for_shade/