Take the 2-minute tour ×

I have a shapefile with one layer. I can open it with QGis. Now I want to convert this shapefile or layer to Spatialite database. How can I do it? Is it possible to do with QGis?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

There is a GUI application called spatialite-gui that allows you to import shapefiles and build spatial indexes.

share|improve this answer
add comment

Several options!

  1. Within QGIS, you can "File|Save as" the shapefile directly as a spatialite database; the limitation here is that you can make a database with only one shapefile.

  2. You can use the command line spatialite_tool to load and manage shapefiles (tutorial here).

  3. It is really worth exploring the spatialite-gui and spatialite-gis standalone applications, which let you view and modify data directly. In the gui app, create a new database (second toolbar button), then load a shapefile (green world icon with arrow) - you must know and input the SRID of the shapefile in the resulting dialog. The advantage here is that you can easily add multiple shapefiles, and build a large database.

share|improve this answer
add comment

You can right-click the layer and select "save layer as..." and choose spatiaLite as your format. Your only option there is to create a new database, i.e. you cannot add it to an existing database.

The QspatiaLite plugin adds a lot of functionality to QGIS, so give that a try as well.

share|improve this answer
add comment

Your Answer


