[PR] この広告は3ヶ月以上更新がないため表示されています。
ホームページを更新後24時間以内に表示されなくなります。
--- #!/bin/sh for zipfile in FG-GML-*-DEM10B.zip do unzip ${zipfile} done ---つぎに、XMLをTIFに変換
--- for xmlfile in FG-GML-*.xml do gdal_translate -of GTiff ${xmlfile}.bin ${xmlfile}.tif done ---
--- for x in 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 do for y in 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 do gdal_merge.py -o ${x}${y}.tif -ps 0.00011111111111 0.00011111111111 -init -9999 FG-GML-${x}${y}-??-dem10b-????????.xml.tif done done ----とやると、こんな感じのタイルになる→ 日本全体(一部地域を除く)
---- r.in.gdal --o input=${x}${y}.tif output=${x}${y} r.null map=${x}${y} setnull=-9999 r.colors map=${x}${y} rules=srtm g.region rast=${x}${y} d.rast ${x}${y} ----この結果が上の 日本全体(一部地域を除く)という訳です。
---- gdal_merge.py -o yura.tif -ps 0.00011111111111 0.00011111111111 -init -9999 5334.tif 5335.tif 5234.tif 5235.tif ----出来たyura.tifをr.in.gdalして、d.zoomで必要部分だけズームアップして、 さらに、その部分だけのファイルを作る。
---- r.in.gdal --o input=yura.tif output=tmp r.null map=tmp setnull=-9999 r.colors map=tmp rules=srtm g.region rast=tmp d.rast tmp d.zoom (適当にズームアップ) r.out.ascii input=tmp output=tmp.dat r.in.ascii input=tmp.dat output=yura g.remove tmp ----という感じで表示部分だけ切り取る。 (r.outしてr.inするあたりは、チョット・ヲイヲイだけど、他の方法がよく分からん。 きっと、スマートな方法があるに違いないが)
d.rast ashu r.watershed elevation=ashu stream=ashu_stream threshold=10000 r.thin input=ashu_stream output=ashu_stream_thin r.to.vect input=ashu_stream_thin output=ashu_stream_vect feature=line d.vect ashu_stream_vect
----- r.watershed elevation=ashu accumulation=ashu_accu basin=ashu_basin threshold=10000 r.to.vect input=ashu_basin output=ashu_basin_vect feature=area d.vect ashu_basin_vect type=boundary -----由良川上流部