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
【2019/06/25 オタクLT】WebGISで遊ぼう(基礎編)
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
虎の穴ラボ株式会社
June 25, 2019
Technology
920
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
【2019/06/25 オタクLT】WebGISで遊ぼう(基礎編)
虎の穴ラボ株式会社
June 25, 2019
More Decks by 虎の穴ラボ株式会社
See All by 虎の穴ラボ株式会社
関西Ruby登壇資料
toranoana
0
33
Tailwind CSSとAtomic Designで実現する効率的な Web 開発の事例
toranoana
1
710
Denoについて、同人誌記事を出しました+update
toranoana
0
240
【虎の穴ラボ Tech Talk #2】プロンプトエンジニアリング
toranoana
0
170
20241121_[TechTalk#2]虎の穴ラボでのLLMについて取り組み紹介
toranoana
0
180
社内チャットへRAG導入した話(Tech Talk #2)
toranoana
0
250
Deno Deploy で Web Cache API を 使えるようになったので試した知見
toranoana
1
770
【虎の穴ラボ Tech Talk】虎の穴ラボTech Talk説明資料
toranoana
0
530
虎の穴ラボ Tech Talk_CDKでFargate環境構築
toranoana
1
700
Other Decks in Technology
See All in Technology
特殊変数大全
dak2
0
150
全社共通データ基盤をつくる。ソニーのDatabricks活用とデータガバナンス設計の裏側
sony
0
110
エージェントはローカル、検証はMicroVM — Lambda MicroVMsでつくるServerless CI
fujioka6789
3
820
猫でもわかるKiro Web
kentapapa
1
120
Coil3を内部実装から読み解く~キャッシュ戦略とAVIF画像の描画〜/nikkei-tech-talk50
nikkei_engineer_recruiting
0
110
AIに会社の文脈を理解させる技術~上流工程・非エンジニアにも広げるハーネスエンジニアリング実践~
ochtum
0
130
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
3
21k
Amazon Bedrock Agents ClassicからAmazon Bedrock AgentCoreへ移行した際、ガードレール設定が2箇所に割れた話
matsunobu
0
120
ScotSecure West 2026 - Glasgow
raybugg
0
190
What the customer really needed
kawaguti
PRO
3
230
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
32
33k
AIエージェント時代のPlatform as a Product —— テックリードがPdMとして回す発見・導入・計測 / Platform as a Product in the AI Agent Era
toshi0607
1
390
Featured
See All Featured
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
270
Skip the Path - Find Your Career Trail
mkilby
1
240
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
290
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
340
Transcript
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. WebGISで遊ぼう(基礎編)
虎の穴ラボ 藤原 佳顕 1 2019/06/25 【とらのあな主催】オタクが最新技術を追うライトニングトークイベント8回目
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. 自己紹介
{ 名前:藤原 佳顕 担当:Fantia 前職:GIS絡み(デスクトップからWebまで) like:{ 趣味:毎日ゲーセン行ってダライアス外伝ってゲームやってます アニメ:最近屍者の帝国とか見ました }, 今日の内容:ハッカソンイベント用に作った地図アプリの紹介です。 } 2
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. アジェンダ
• 自己紹介 • GISの基礎 • Leafletを使ってみよう • マーカーを表示してみよう • 地図を切り替えてみよう 3
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. GISの基礎
• GIS: Geographic Information System – 要するに地図を扱うシステム全般です • よく出てくる用語 – レイヤ(主題図、背景地図、カスタムレイヤ) • データを一括で扱うため – メッシュタイル • 格子のイメージに分割された地図画像 • 地図を一枚で表示すると画像サイズが巨大すぎるため – 座標系 • 世界測地系、日本測地系、ピクセル座標系、平面直角座標系 • メルカトル図法などの図法によって異なるので変換が必要 4
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. GISの基礎
レイヤのイメージ 引用: http://desktop.arcgis.com/ja/arcmap/10.3/guide-books/map-projections/what-are-map-projections.htm 5
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. GISの基礎
メッシュのイメージ 引用: https://www.pref.aichi.jp/kankyo/sizen-ka/shizen/yasei/rdb/chizu.html 6
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. GISの基礎
WebGISの基本構成イメージ 7
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. 地図ライブラリを使ってみよう!
• 最終的にできるもの – https://vigilant-mcnulty-2dc2e4.netlify.com/ • Leaflet.jsっていう地図描画ライブラリを使います • netlifyを使ってmasterへのgit pushで同時にデプロイされます。 • (せっかくなんでTypeScriptです) 8 $ npm init $ npm install --save leaflet leaflet-routing-machine typescript $ npm install --save-dev @types/leaflet @types/leaflet-routing-machine ts-loader webpack webpack-cli webpack-dev-server prettier
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. Leafletを使ってみる
• 地図描画用のJavaScriptライブラリ(ちなみに地図ライブラリはどれも似通っています ) – メッシュ画像配信サーバーは別途存在する必要がある – 幸いなことにメッシュ画像配信サービスはいくつか存在する • 地理院地図(国土地理院) • OpenStreetMap(誰でも編集できるフリーの地図 ) 9 <html lang="ja"> <head> <link rel="stylesheet" href="https://unpkg.com/
[email protected]
/dist/leaflet.css" integrity="割愛" crossorigin=""/> <link rel="stylesheet" href="app/css/main.css" crossorigin="" /> <script src="https://unpkg.com/
[email protected]
/dist/leaflet.js" integrity="割愛" crossorigin="" ></script> </head> <body> <!-- 地図挿入先のエレメントを用意 --> <div id="mapid" /> <script src="app/js/main.js" crossorigin=""></script> </body> </html>
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. Leafletを使ってみる
10 (function() { // 地図オブジェクト生成 let mymap = new L.Map('mapid').setView(TORA_BUILDINGS, 18); // レイヤ追加(OSM) L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: LICENSES['OSM'], maxZoom: 19, }).addTo(mymap); })(); • Lオブジェクトにぶら下がる形で各操作用のオブジェクトが存在します。 • 画面の左端を原点として緯度経度と拡大率から必要なメッシュタイル画像を判別し ます(xyzの指定)
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. マーカーを追加してみよう
• マーカーもレイヤの一つです(latlngは点の緯度経度) 11 // 削除などをすることも考えてmarkerオブジェクトを保持 const marker = L.marker(latlng) .addTo(map) .bindPopup(text, {autoClose: false, closeOnClick: false}) .openPopup();
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. 背景地図の(複数)追加
const gsi = L.tileLayer( "https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png", { attribution: "<a href='https://maps.gsi.go.jp/development/ichiran.html' target='_blank'>地理院タイル</a>" } ); const osm = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { attribution: LICENSES["OSM"], maxZoom: 19 } ); //baseMapsオブジェクトのプロパティに3つのタイルを設定 const baseMaps = { OpenStreetMap: osm, 地理院地図: gsi }; //layersコントロールにbaseMapsオブジェクトを設定して地図に追加 //コントロール内にプロパティ名が表示される L.control.layers(baseMaps).addTo(mymap); osm.addTo(mymap); 12
虎の穴 虎の穴 虎の穴 虎の穴 Copyright © 2019 Toranoana Inc. All Rights Reserved. •
Leafletを使って地図が表示できるようになりました • レイヤやメッシュなど地図に関連する基本的なことを話しました • 次回:PostgreSQLのGIS拡張であるPostGISを使って地図画像配 信サーバーを作ってみる(仮) 13 まとめ