Shell script とは

Demo

Shell script で FOSS4G 連携
縫村崇行 1,2
(NUIMURA, Takayuki)
1
2

名古屋大学

OSGeo 財団日本支部

2013/11/01

1/5
Shell script とは

Demo

Shell script とは
様々なコマンドライン処理をスクリプト (*.sh) に記述することで、
コマンド郡を一括処理ができる
CUI インターフェースを持つソフトウェアの処理を連携

Shell script

2/5
Shell script とは

Demo

OS (ここでは Linux) が持つコマンド + FOSS4G コマンド

⇓
大量の GIS データの一括処理
解析パラメータを徐々に変えて一括処理

3/5
Shell script とは

Demo

Demo 1: DEM =⇒ 等高線 (GDAL/OGR) =⇒ 表示 (QGIS)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

dem_files=$(ls *dem*.tif)
intervals=(100 200 1000)
for dem in ${dem_files}; do
echo "Proessing "${dem}
for interval in ${intervals[@]}; do
echo "Generating "${interval}" m interval"
contour=${dem%.tif}_ctr${interval}.shp
gdal_contour -i ${interval} ${dem} ${contour}
done
done
qgis $(ls *ctr*.shp)

4/5
Shell script とは

Demo

Demo 2: DEM =⇒ 傾斜 (GRASS) =⇒ 表示 (QGIS)

1
2
3
4
5
6
7
8
9
10
11

dem=srtm_dem30.tif
slope=srtm_slope30.tif
r.in.gdal input=${dem}
output=temp_dem
g.region rast=temp_dem
r.slope.aspect elevation=temp_dem slope=temp_slope
r.out.gdal -c input=temp_slope output=${slope}
g.mremove -f rast=temp* vect=temp*
qgis ${slope}

5/5

More Related Content

PPTX
120517 cf tour_london
PDF
新生Lagopus2017(仮称)
PDF
Debianで組み込み環境
PDF
Lagopus.confの書式(for lagopus 0.1.x)
PDF
How to build LibreOffice on your desktop (日本語版)
PPTX
NGSPICEの基本操作
KEY
Cost of ovs receiving process
PDF
Cocoa勉強会#33-意外に楽に使えるlibcurl
120517 cf tour_london
新生Lagopus2017(仮称)
Debianで組み込み環境
Lagopus.confの書式(for lagopus 0.1.x)
How to build LibreOffice on your desktop (日本語版)
NGSPICEの基本操作
Cost of ovs receiving process
Cocoa勉強会#33-意外に楽に使えるlibcurl

What's hot (6)

PDF
FuelPHPのscaffoldで作成した画面をdotcloudにデプロイしてみた
PDF
Clojure で chatbot 作るライブラリ作った
PPTX
これだけMakefile (Basics of makefile)
PPT
Mercurial はオフラインの海を越える
PPTX
Bat jscrpt powershell
PPTX
Electronについて
FuelPHPのscaffoldで作成した画面をdotcloudにデプロイしてみた
Clojure で chatbot 作るライブラリ作った
これだけMakefile (Basics of makefile)
Mercurial はオフラインの海を越える
Bat jscrpt powershell
Electronについて
Ad

Viewers also liked (16)

PDF
130727 nagoyar presentation
PDF
131107 foss4 g_osaka_grass7_presentation
PDF
131101 foss4 g_tokyo_r_presentation
PDF
131031 foss4 g_tokyo_grass_handson_presentation
PDF
Grass ライトニングトーク 120630_hokkaido
PPTX
Tile map 2011_foss4g_osaka
PPTX
GRASS × SQLite でベクタを扱ってみる
PPTX
20131218 off4g
PDF
GRASSセミナー基礎編
PDF
Qgisを考古学で使う
PDF
151009 foss4 g_tokyo_grass7_handson_presentation
PDF
ArcGISの便利な印刷周りの機能に、QGIS APIを駆使して挑んでみたお話
PDF
GRASSセミナー応用編
PDF
151012 foss4 g_tokyo_grass7_presentation
PDF
150810 ilts workshop_handson_presentation
PDF
150828 rihn gis_workshop_handson_presentation
130727 nagoyar presentation
131107 foss4 g_osaka_grass7_presentation
131101 foss4 g_tokyo_r_presentation
131031 foss4 g_tokyo_grass_handson_presentation
Grass ライトニングトーク 120630_hokkaido
Tile map 2011_foss4g_osaka
GRASS × SQLite でベクタを扱ってみる
20131218 off4g
GRASSセミナー基礎編
Qgisを考古学で使う
151009 foss4 g_tokyo_grass7_handson_presentation
ArcGISの便利な印刷周りの機能に、QGIS APIを駆使して挑んでみたお話
GRASSセミナー応用編
151012 foss4 g_tokyo_grass7_presentation
150810 ilts workshop_handson_presentation
150828 rihn gis_workshop_handson_presentation
Ad

Similar to 131101 foss4 g_tokyo_grass_shell_presentation (20)

PDF
ただいまHadoop勉強中
PDF
インフラ運用管理ツールとGolang OSS運用管理勉強会LT
PPTX
どこでも動くゲームを作るためのベタープラクティス
PPTX
Powershell勉強会 v5 (こちらが最新です。)
PPTX
Rse3.2からRse3.5への移行
PDF
20121217 jawsug-yokohama
PDF
短絡的に作るRuby DSL 公開版
PPTX
Powershell基礎_20180521用
PPTX
20170527 inside .NET Core on Linux
PPTX
Cloud9にリモートデスクトップ接続する
PDF
開発者なのに運用で手がいっぱい? そんなあなたに贈る、 クラウド時代に最適な OSS の RDBMS ! Azure Database for MySQL...
PPT
Shibuya Pm Tt08 Advanced Mogilefs
PDF
WTM53 phpフレームワーク いまさらcodeigniter
PDF
Hudson using Groovy #jggug
PPT
いまさら聞けないRake入門
PPTX
ロボットシステムのつくりかた 〜Robot Operating Systemというアプローチ〜
PPT
Javascriptで無限ループを実現する5つの方法
PDF
Tizen 2.0 alpha でサポートされなかった native api
PPTX
Ll tiger clojure
ただいまHadoop勉強中
インフラ運用管理ツールとGolang OSS運用管理勉強会LT
どこでも動くゲームを作るためのベタープラクティス
Powershell勉強会 v5 (こちらが最新です。)
Rse3.2からRse3.5への移行
20121217 jawsug-yokohama
短絡的に作るRuby DSL 公開版
Powershell基礎_20180521用
20170527 inside .NET Core on Linux
Cloud9にリモートデスクトップ接続する
開発者なのに運用で手がいっぱい? そんなあなたに贈る、 クラウド時代に最適な OSS の RDBMS ! Azure Database for MySQL...
Shibuya Pm Tt08 Advanced Mogilefs
WTM53 phpフレームワーク いまさらcodeigniter
Hudson using Groovy #jggug
いまさら聞けないRake入門
ロボットシステムのつくりかた 〜Robot Operating Systemというアプローチ〜
Javascriptで無限ループを実現する5つの方法
Tizen 2.0 alpha でサポートされなかった native api
Ll tiger clojure

More from Takayuki Nuimura (20)

PDF
161104 foss4 g_tokyo_qgis_handson_presentation
PDF
オープンサイエンスの雪氷学への応用と展望 雪氷研究大会2016 特別セッションの紹介
PDF
141031 qgisr handson_presentation
PDF
130622 osc nagoya_presentation
PDF
130612 ocu lecture_presentation
PDF
130521 jp gu2013_handson2_presentation
PDF
130521 jp gu2013_handson1_presentation
PDF
130113 os mworkshop_presentation
PDF
121215 foss4 g_nagoya_qgis_handson
PDF
121105 foss4 g_tokyo_qgis_handson
PDF
121107 foss4 g_osaka_r_handson_presentation
PDF
2012 nov foss4g_presentation
PDF
121012 gisa qgis_handson
PDF
120727 gms2012nagoya presentation
PDF
120630 os mworkshop_presentation
PDF
120619 os mworkshop_presentation
PDF
120620 chred r_presentation2
PDF
120620 chred r_presentation1
PDF
120414 foss4g nagoya_presentation2
PDF
120414 foss4g nagoya_presentation1
161104 foss4 g_tokyo_qgis_handson_presentation
オープンサイエンスの雪氷学への応用と展望 雪氷研究大会2016 特別セッションの紹介
141031 qgisr handson_presentation
130622 osc nagoya_presentation
130612 ocu lecture_presentation
130521 jp gu2013_handson2_presentation
130521 jp gu2013_handson1_presentation
130113 os mworkshop_presentation
121215 foss4 g_nagoya_qgis_handson
121105 foss4 g_tokyo_qgis_handson
121107 foss4 g_osaka_r_handson_presentation
2012 nov foss4g_presentation
121012 gisa qgis_handson
120727 gms2012nagoya presentation
120630 os mworkshop_presentation
120619 os mworkshop_presentation
120620 chred r_presentation2
120620 chred r_presentation1
120414 foss4g nagoya_presentation2
120414 foss4g nagoya_presentation1

131101 foss4 g_tokyo_grass_shell_presentation

  • 1. Shell script とは Demo Shell script で FOSS4G 連携 縫村崇行 1,2 (NUIMURA, Takayuki) 1 2 名古屋大学 OSGeo 財団日本支部 2013/11/01 1/5
  • 2. Shell script とは Demo Shell script とは 様々なコマンドライン処理をスクリプト (*.sh) に記述することで、 コマンド郡を一括処理ができる CUI インターフェースを持つソフトウェアの処理を連携 Shell script 2/5
  • 3. Shell script とは Demo OS (ここでは Linux) が持つコマンド + FOSS4G コマンド ⇓ 大量の GIS データの一括処理 解析パラメータを徐々に変えて一括処理 3/5
  • 4. Shell script とは Demo Demo 1: DEM =⇒ 等高線 (GDAL/OGR) =⇒ 表示 (QGIS) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 dem_files=$(ls *dem*.tif) intervals=(100 200 1000) for dem in ${dem_files}; do echo "Proessing "${dem} for interval in ${intervals[@]}; do echo "Generating "${interval}" m interval" contour=${dem%.tif}_ctr${interval}.shp gdal_contour -i ${interval} ${dem} ${contour} done done qgis $(ls *ctr*.shp) 4/5
  • 5. Shell script とは Demo Demo 2: DEM =⇒ 傾斜 (GRASS) =⇒ 表示 (QGIS) 1 2 3 4 5 6 7 8 9 10 11 dem=srtm_dem30.tif slope=srtm_slope30.tif r.in.gdal input=${dem} output=temp_dem g.region rast=temp_dem r.slope.aspect elevation=temp_dem slope=temp_slope r.out.gdal -c input=temp_slope output=${slope} g.mremove -f rast=temp* vect=temp* qgis ${slope} 5/5