You are trying the new MyGeodata Cloud. Send feedback Back to the previous version

Vector · Database & container

SQLite — SQLite / SpatiaLite

Spatial extension to the SQLite database adding geometry columns, spatial SQL functions and R*Tree indexing in a single file.

Type
Vector · Database & container
Extension
.sqlite, .sqlite3, .db
Converter
Read & write
Coordinate system
Any (EPSG, ESRI, custom)
Layers
Multiple

What is a SQLite file?

SpatiaLite is an open-source extension to the SQLite database engine that adds spatial data types, metadata tables and a large library of SQL spatial functions. It is developed primarily by Alessandro Furieri. A SpatiaLite database is an ordinary single-file SQLite database, commonly using the .sqlite or .db extension. Geometry columns are stored as BLOBs in SpatiaLite's own binary encoding and registered in tables such as geometry_columns and spatial_ref_sys.

It is used for local spatial databases, data processing pipelines and as a lightweight alternative to a server database. Spatial queries can be accelerated with R*Tree indexes provided by SQLite, while geometric operations and reprojection rely on libraries such as GEOS and PROJ. Each geometry column has its own declared type and SRID, and separate tables act as layers. Full use requires software that loads the SpatiaLite extension; plain SQLite tools see geometries only as binary data.

SpatiaLite files are exchanged by GIS analysts, mobile app developers and data engineers who need a portable spatial database in one file. The .sqlite or .db extension does not show whether spatial support is present, so check for geometry_columns and spatial_ref_sys tables. Note the SRID and geometry type of each column, and confirm that the receiving software can load the SpatiaLite extension.

Typical uses

  • Storing several vector layers and attribute tables together in one portable file.
  • Running SQL spatial queries and joins on local data without a database server.
  • Passing intermediate results between steps of a data processing pipeline.
  • Distributing a self-contained spatial dataset to colleagues or to field devices.
Files: Spatial tables with geometry columns; RTree spatial index.

Sample SQLite files — free download

Small, real datasets of the island of Saint Helena (OpenStreetMap, Copernicus DEM, Sentinel-2). Download them, open them in your software, or convert them in one click.

Preview of the sample data: Saint Helena basemap st-helena-basemap.sqlite

Basemap (7 layers)

Multi-layer basemap of Saint Helena: island outline, land cover, waterways, 100 m contours, roads, Jamestown buildings and places. SpatiaLite database.

  • island · MultiPolygon · 1
  • landcover · Polygon · 190
  • waterways · LineString · 117
  • contours · LineString Z · 27
  • EPSG:4326
  • 932 kB
Attributes (3)
nameStringarea_km2Realosm_idString
Saint Helena122.914868269

© OpenStreetMap contributors, ODbL 1.0 · Copernicus DEM © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA

Preview of the sample data: Saint Helena places st-helena-places.sqlite

Places (points)

58 places of Saint Helena (20 settlements, 17 peaks, 21 points of interest) with name, category, elevation from Copernicus DEM and OSM id. SpatiaLite database.

  • places · Point · 58
  • EPSG:4326
  • 244 kB
Attributes (7)
idIntegernameStringcategoryStringkindStringelevationIntegersummaryStringosm_idString
10Jamestowntownsettlement36Capital and only port of Saint Helena293673697
22Diana's Peakpeakpeak809Highest point of Saint Helena4254622180
47Longwood Housemuseumpoi544Napoleon's residence in exile, 1815-182135798100
46Jacob's Ladderlandmarkpoi74Staircase of 699 steps from Jamestown up to Ladder Hill146163201
53Saint Helena Airportairportpoi326Island airport, scheduled flights since 2017166589674

© OpenStreetMap contributors, ODbL 1.0 · Copernicus DEM © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA

Frequently asked questions

Geometries are stored as BLOBs in SpatiaLite's own binary encoding. A plain SQLite tool cannot interpret them, so you need software that loads the SpatiaLite extension or a GIS application such as QGIS.

Ready to convert your data?

Drop the files and the Converter does the rest — no install, no account needed for your first conversions.