Importing data into a SpatiaLite database is easy using the DB Manager. SpatiaLite supports the following commonly-used formats, as well as many other formats, for importing files:
Shapefile (
.shp
)dBase (
.dbf
)Text (
.txt
), Commas Separate Values (.csv
), and Excel spreadsheets (.xls
/.xlsx
)AutoCAD DXF (
.dxf
)Geography Markup Language (
.gml
)Keyhole Markup Language (
.kml
)Geometry JavaScript Object Notation (
.geojson
)Scalable Vector Graphics (
.svg
)
Let's use DB Manager to import data in a few different formats into our GiffordPinochet.sqlite
database.
To import a KML file into a SpatiaLite database, complete the following steps:
Open DB Manager by clicking on DB Manager under Database. Expand SpatiaLite and select GiffordPinochet.sqlite on the Tree panel.
Navigate to Table | Import layer/file to open the Import vector layer dialog.
Click on the ellipsis button at the right-hand side of the Input drop-down box. Choose Keyhole Markup...