


Gives an error: Result: ST_Transform exception – unable to find the origin SRID.ģ] select st_astext(st_transform(geom, 3857)) from ukraine – worksĤ] select, st_area(geometry) as area from ukraine order by area desc ’ –worksĬonclusion: We can get spatial functions from GeoPackage working in DB Browser for SQLite, but it requires SpatiaLite functionality (mod_spatialite.dll) and an extra step for the amphibious mode/InitSpatialMetadata. Now we can use the spatial functions as before:ġ] Version: ‘select spatialite_version() ’ –> returns ‘5.0.1’Ģ] Projections: ‘select st_astext(st_transform(geometry, 3857)) from ukraine’ Everything is done client-side and never leaves your browser. The latest installation package that can be downloaded is 16.1 MB in size.
#Db browser for sqlite free download for mac
DB Browser for SQLite for Mac belongs to Developer Tools. Turns out we have to enable the ‘amphibious mode’, this enables SpatiaLite to work with GeoPackage geometries. Download DB Browser for SQLite 3.12.2 for Mac from our software library for free. So after loading the ‘mod_spatialite.dll’ extension and retry the query “select st_astext(geom) from ukraine”, we get a different error: The geometries are all null…Īpparently, the SpatiaLite function is there, but it can’t handle the GeoPackage geometries. What to do now… One option is to load the ‘mod_spatialite.dll’ from the QGIS bin directory again from menu Tools –> Load Extension… Although we don’t have a SpatiaLite database but a GeoPackage, what will happen? When using a spatial function we get the error again about missing function (no such function) This was expected as a GeoPackage is a regular SQLite database. In DB Browser for SQLite, counting the number of records works. We start again by downloading the GeoJSON file of Ukraine districts, Ĭonvert to GeoPackage using ogr2ogr: $ ogr2ogr -f gpkg ukraine.gpkg Ukraine.jsonįirst observation: The GeoPackage is much smaller:Īnother difference: The default geometry column name is ‘geometry’ in case of SpatiaLite, ‘geom’ in case of GeoPackage.įor visualizing in QGIS there is an option ‘GeoPackage’ in the browser: So let’s do the exercise again, we’ll download some spatial data, create a GeoPackage and see how we can use it in QGIS and DB Browser for SQLite. For more information about GeoPackage see This standard is developed by the Open Geospatial Consortium (OGC). More recently (2014) there was another initiative to store spatial data in a SQLite: GeoPackage (GPKG).

The initial release of SpatiaLite was in 2008, nowadays it’s used in many software packages (see ).
#Db browser for sqlite free download how to
In yesterday’s article ( ), we investigated SpatiaLite and how to use spatial functionality in DB Browser for SQLite.
