Loading OS OpenData raster images into a Rasterlite database.
There are pre-compiled Rasterlite/Spatialite binaries for Windows (32 and 64-bit) so I took this route.
Step 1, install the software. For 32-bit Windows go here:
http://www.gaia-gis.it/gaia-sins/windows-bin-x86/
or for 64-bit Windows go here:
http://www.gaia-gis.it/gaia-sins/windows-bin-amd64/
Download (as a minimum) the following files and unzip them to a directory (I used C:/spatialite).
rasterlite_load-1.1c-win-xxx.zip
rasterlite_pyramid-1.1c-win-xxx.zip
rasterlite_topmost-1.1c-win-xxx.zip
spatialite-3.0.1-DLL-win-xxx.zip
spatialite_gui-1.5.0-stable-win-xxx.zip
You will also need a recent version of sqlite3.dll (the one that comes with OSGEO4W is too old), get it here:
http://www.sqlite.org/sqlite-dll-win32-x86-3071100.zip
Unzip this to the C:/spatialite folder.
Finally, add C:/spatialite to your path.
Step 2, prepare the raster images. OpenData rasters are indexed TIFFs with world files. To be loaded into a Rasterlite database these need to be batch converted to geotiffs. Do this in QGIS, Raster -> Conversion -> Translate. Use batch mode and (most important) tick 'Expand' and set 'RGB'.
Step 3, load the directory of GeoTIFFs into a Rasterlite database. Go to your C:/spatialite directory, click on spatialite_gui and then create a new spatialite database in the directory containing the GeoTIFFs, you could call this 'vmd.sqlite' for example.
Next, open a command line window in the directory containing the GeoTIFFs and type this command:
rasterlite_load -d vmd.sqlite -T vmd -D . -i wavelet -q 25
This should load all of the GeoTIFFs in the directory into vmd.sqlite, in a table called 'vmd'. It will take a while, but the progress will be reported.
Next, build pyramids:
rasterlite_pyramid -d vmd.sqlite -T vmd -i wavelet -v
When this finishes, set topmost:
rasterlite_topmost -d vmd.sqlite -T vmd -v
That should be it, load the new Rasterlite database into QGIS via Layer -> Add Raster Layer.
See:
www.gaia-gis.it/gaia-sins/rasterlite-docs/rasterlite-how-to.pdf
for more on Rasterlite.
In closing. You can download one of my Rasterlite VectorMap District (VMD) databases from here (about 500 KB):
http://dl.dropbox.com/u/45121071/vmd.sqlite
Right-click on the link to download the db, don't try to open it in a browser.
Ordnance Survey VMD rasters are of course a blurry, washed-out, badly-styled, badly-labelled disgrace and you can't make a silk purse out of a pig's ear. The db should however load into QGIS with no problems, it looks best at about 1:10000. The QGIS screen rendering isn't that good either, but you can obtain the best quality available by exporting images from the print composer.
If you have problems loading the db let me know, it works here in QGIS 1.7.4 (Win) and in Master (Ubuntu). Nick.