I am trying to convert a raster to SQLite using rasterlite2 and gdal a la:

gdal_translate -f SQLite raster.img raster.sqlite

but after running the command I get the following error:

ERROR 1: SQLite driver has no raster capabilities.

I am using Ubuntu 20.04 and have installed the following with apt install

  • gdal-bin
  • libgdal-dev
  • sqlite3
  • spatialite-bin
  • libspatialite-dev
  • rasterlite2-bin
  • librasterlite2-dev

I thought these are the only dependencies, but maybe I am missing something?

Does anyone spot anything missing?


Why don't you try GPKG or MBTILES (Raster Tiles in SQLite)

GPKG can be any SRS /Projection and is organized in XYZ MBTILES is always 3857 Web Mercator and is organized in TMS

They are standard map tiles 256x256 pixel images in tile_data blob with integers zoom_level, tile_column,tile_row

GPKG adds supporting tables and can include more than one table of tiles (just named differently) MBTILES is only one table named tiles and a metadata table.

use gdaladdo to add the upper zoom levels/overviews

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.