Importing data into a SpatiaLite database
Importing data into a SpatiaLite database is easy using the DB Manager. SpatiaLite supports the following formats for importing files:
- Shapefile (
.shp
) - Dbase (
.dbf
) - Text (
.txt
), Commas Separate Values (.csv
), and Excel spreadsheets (.xls
) - Well-known Text (
.wkt
) and Well-known Binary (.wkb
) - PostGIS (
.ewkt
/.ewkb
) - 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.
Importing KML into SpatiaLite
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 and select...