[OSGeoJapan-discuss] gdalで画像結合が遅くて困っています。

Nobusuke Iwasaki wata909 @ gmail.com
2013年 8月 8日 (木) 06:54:30 PDT


斎藤さま

岩崎と申します。

私のやった経験の範囲なのですが、GDAL_CACHEMAX で使用するメモリ量を多くすると、かなり早くなりました。

2013年8月8日 22:25 斎藤 直正 <nsaito @ msk-web.co.jp>:
> 斎藤と申します。
> 初めて投稿させて頂きますの、不躾な点があるかと思いますが
> 宜しくお願いしますm(_)m
>
>  現在、700枚程の航空写真をタイル画像にしようと思い、まずは画像合成?結合
> からということで、Windows 7からgdal_merge.pyを使用してみたところ、ファイ
> ル数が
> 多すぎて、コマンドラインからはみ出る様なエラーが発生し上手く利用できませ
> んでした。
>
>  そこで、Linux(CentOS 6.4)にgdalをソースからインストールして、
> gdalwarpを以下のコマンドで実行してみたところ、とてつもなく時間が掛かって
> しまい困惑しています。(24時間で2枚しか処理できませんでした)
>  gdalは gdal-1.10.0を使用しています。
>
> # gdalwarp *.tif ../dest_dir/all.tif -dstnodata -9999 -srcnodata -9999
> Creating output file that is 214000P x 195000L.
> Processing input file 09xxxx1.tif.
> for band 1, destination nodata value has been clamped to 0, the original
> value being out of range.
> 0...10...20...30...40...50...60...70...80...90...100 - done.
> Processing input file 09xxxx2.tif.
> for band 1, destination nodata value has been clamped to 0, the original
> value being out of range.
> 0...10...20...30...40...50...60...70...80...90...100 - done.
>
> <以下省略>
>
>  gdalは以下のconfigureオプションで作成しています。
> # ./configure --with-perl --with-php --with-python --with-expat
> --with-expatlib=/usr/lib64 \
> --with-poppler --with-expatinc=/usr/include --with-libtiff=/usr
> --with-geotiff=/usr/ \
> --with-threads
>
> # make
> # make install
>
>  ちなみに、
>  --with-expatlib=/usr/lib64
>  --with-expatinc=/usr/include
>  については、configure --helpで見ると、
> --with-expat-lib=/usr/lib64
> --with-expat-inc=/usr/include
> であるべきなのですが、--with-expat-libと「expat」と「lib」もしくは
> 「inc」の間に
> 「-」を入れるとエラーではじかれるので、間の「-」が無いのが正しそうだと
> 思っています。
>
> その後、pythonのツールを有効にしようと思い、以下のコマンドを実行しています。
>
> # cd swig/python/
> # easy_install GDAL
> # python setup.py build
> # python setup.py install
>
> 各種必要なライブラリ等は、yumやrpmなどでインストールを施してインストール
> したつもりです。
>
>  やり方に問題があるのでしょうか?
>  マシン環境が悪いのか?
>
>  gdal以外の方法でも構わないので、高速化させる方法があればご教示頂けない
> でしょうか?
>
>  ちなみに、ファイル数を70ファイルぐらいに限定し、コマンドを以下の様に
> 少し変更してみたのですが、それだと、1時間で3ファイルぐらいは処理してく
> れているようです。
>
> # gdalwarp *.tif ../dest_dir/all.tif -dstnodata -9999 -srcnodata -9999
> -multi
>
> -multiを追加しました。思い付きで、並列処理してくれるのかな?と思っていま
> すが、
> 違うのかな?速くなった気がほとんどしないような・・・
>
> 以上、宜しくお願いします。
>
>
> --
> /////////////////////////////////////////////////////////
> 株式会社 エムエスケー
> 斎藤 直正
> TEL:0598-51-7471 / FAX:0598-52-4849
> E-mail:nsaito @ msk-web.co.jp  URL:http://www.msk-web.co.jp
> /////////////////////////////////////////////////////////
>
> _______________________________________________
> OSGeoJapan-discuss mailing list
> OSGeoJapan-discuss @ lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/osgeojapan-discuss



-- 
岩崎 亘典


More information about the OSGeoJapan-discuss mailing list