I am trying to import shapefiles into a spatialite database using spatialite-gui.

I am having problems with the types of the variables since spatialite-gui has no obvious way to handle shapes which use "," as decimal separator, and mangles my date fields which are in YYYY/MM/DD format.

QGIS 1.7.4 imports the same shapefiles without any issues, handling all the conversions transparently, but will not let me save to a Spatialite database.

Is there a more robust way of importing a shapefile into Spatialite?

  • Are you willing to use the command line interface?
    – BradHards
    Jan 26, 2014 at 3:28

2 Answers 2


If you are happy with the conversion QGIS does, just get the new QGIS version 2.0. It will happily save to Spatialite.

  • I have tried this feature from QGIS 2.0. it's great to see QGIS improving in this respect
    – fccoelho
    Jan 27, 2014 at 11:50

Well since I was doing this for a django project, I Used the ogrinspect command and then the LayerMapping function to import the data:

you can find the documentation here:


It worked like a charm!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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