


Funny note: districts 23 Mykolaiv, 24 Kherson and 25 Odessa have a negative area, this has probably something to do with polygon orientation in the source data. With the SQLite viewer web application, you can easily open and view any SQLite database in your browser. ‘select, st_area(geometry) as area from ukraine order by area desc ’ ‘select st_astext(st_transform(geometry, 3857)) from ukraine’Ĭonverts the coordinates to EPSG:3857 Spherical Mercator (popular in mapping tools) ‘select spatialite_version() ’ –> returns ‘5.0.1’ Now the result of the ST_AsText function is better: and load file ‘mod_spatialite.dll’ from the QGIS bin directory. To solve this use Tools –> Load Extension…. If we call a spatial function on the geometry column (for example ‘select st_asText(geometry) from ukraine’) there will be an error ‘no such function’ because the tool doesn’t know about spatial functions: Now start DB Browser for SQLite, load the ‘Ukraine.sqlite’ database and in the ‘Execute SQL’ tab do a count on table Ukraine, 25 should be the result: In QGIS we can load the data using the SpatiaLite option in the browser: Using tool ogr2ogr we convert the GeoJSON file to SQLite: $ ogr2ogr -f sqlite -dsco spatialite=yes ukraine.sqlite Ukraine.json DB.-3.12.0-win64.msi - Standard installer for 64-bit Windows DB.-3.12.0-win64.zip -. It allows you to create a relational database and query it entirely in the browser. Prerequisite: Install a recent version of QGIS ( ) and add the bin directory to the system path (something like C:\Program Files\QGIS 3.22.3\bin).įirst download some data, we’ll use districts polygons in GeoJSON format from Ukraine, source Warning: This blog is written for Windows, it might work on other platforms but this is not tested.

Sqlite browser. how to#
In this blog we’ll investigate how to use Spatial functions from SpatiaLite in DB Browser for SQLite ( ). The tool has an extension mechanism to add more functionality. DB Browser for SQLite is a popular open source tool to create, design, and edit database files.
