rasterlite2にこてんぱにやられたので今回はgdal_transferを試す。
参考にしたのはgdal_translateのリファレンスと、Rasterlite – Rasters in SQLite DB。
今回使用したGDAL関連のモジュールはQGISをインストールした際にC:\OSGeo4W\binにインストールしたファイル。
rasterlite2編と同様に「空間データを使うために必要なテーブルを作成」までを実行。
各画像をインポート
[code]
C:\work\pasco>gdal_translate -of Rasterlite 2135.jpg RASTERLITE:work.sqlite,table=source -co DRIVER=JPEG
Input file size is 5000, 3750
0…10…20…30…40…50…60…70…80…90…100 – done.
C:\work\pasco>gdal_translate -of Rasterlite 2136.jpg RASTERLITE:work.sqlite,table=source -co DRIVER=JPEG
Input file size is 5000, 3750
0…10…20…30…40…50…60…70…80…90…100 – done.
C:\work\pasco>gdal_translate -of Rasterlite 2137.jpg RASTERLITE:work.sqlite,table=source -co DRIVER=JPEG
Input file size is 5000, 3750
0…10…20…30…40…50…60…70…80…90…100 – done.
[/code]
Creating internal overviews
[code]
C:\work\pasco>gdaladdo RASTERLITE:work.sqlite,table=source 2 4 8 16
0…10…20…30…40…50…60…70…80…90…100 – done.
0…10…20…30…40…50…60…70…80…90…100 – done.
0…10…20…30…40…50…60…70…80…90…100 – done.
0…10…20…30…40…50…60…70…80…90…100 – done.
[/code]
Creating internal overviewsは以下のほうがよさそうなので改めてGDAL1.10以上バージョンを実行
Creating internal overviews with options (GDAL 1.10 or later):
[code]
C:\work\pasco>gdaladdo RASTERLITE:work.sqlite,table=source 2 4 8 16 –config RASTERLITE_OVR_OPTIONS DRIVER=JPEG,COMPRESS
=JPEG,PHOTOMETRIC=YCbCr
Warning 6: Unexpected option ‘COMPRESS’ for driver ‘JPEG’
Warning 6: Unexpected option ‘PHOTOMETRIC’ for driver ‘JPEG’
0…10…20…30…40…50…60…70…80…90…100 – done.
Warning 6: Unexpected option ‘COMPRESS’ for driver ‘JPEG’
Warning 6: Unexpected option ‘PHOTOMETRIC’ for driver ‘JPEG’
0…10…20…30…40…50…60…70…80…90…100 – done.
Warning 6: Unexpected option ‘COMPRESS’ for driver ‘JPEG’
Warning 6: Unexpected option ‘PHOTOMETRIC’ for driver ‘JPEG’
0…10…20…30…40…50…60…70…80…90…100 – done.
Warning 6: Unexpected option ‘COMPRESS’ for driver ‘JPEG’
Warning 6: Unexpected option ‘PHOTOMETRIC’ for driver ‘JPEG’
0…10…20…30…40…50…60…70…80…90…100 – done.
Creating internal overviews with options (GDAL 1.10 or later):
[/code]
Cleaning internal overviews :
[code]
C:\work\pasco>gdaladdo -clean RASTERLITE:work.sqlite,table=source
[/code]
Creating external overviews in a .ovr file:
[code]
C:\work\pasco>gdaladdo -ro RASTERLITE:work.sqlite,table=source 2 4 8 16
ERROR 6: Cannot add external overviews to a dataset with internal overviews
Overview building failed.
[/code]
「Creating external overviews in a .ovr file:」はエラーが発生したが、QGISで閲覧すると十分なスピードが確保できた。
以上