SpatiaLite: Extends SQLite core to support Spatial SQL capabilities
gaia-gis.it
gaia-gis.it
SQlite really lends itself to having a spatial backend and would likely become a bit player in this space if it did, but it probably needs a major overall first.
I have used it extensively in an embedded product for many years, and it has just worked.
Sure it doesn't have all the postgis goodies, but it has enough that it's not usually hard to find a good way to do the spatial queries you need.
I'm quite surprised by this thread so far, given how robust it's been for me for many years using it in many different ways.
https://www.geopackage.org/implementations.html
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=4.2.0...
See the extensive list of spatial query operators here: http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.0.html
A slightly related problem I encountered several times is reverse geocoding: given a point, a map, which polygon the point is in? I figured out that the problem is solvable via rasterization and run-length-encoding, which doesn't need a spatial library, and works efficiently with any SQL DBs without GIS/spatial extensions. I created a website (https://reverse-geocoding.com/) to demonstrate the idea, which has a GPS-to-country DB in SQLite format.
https://github.com/tidwall/rtree.c
There are python bindings for it (with absolutely no documentation) here:
Any info on performance differences?
However there are situations where you don't want a full blown database server and an embedded db is better.
I have seen one company just store the geometries as well known text in sqlite, then act all confused when their application runs incredibly slow.
One of the greatest things about SQLite is its license (or should I say, lack thereof). It is a pity that so many extensions to SQLite (this included) elect not to follow that example
> SpatiaLite is smoothly integrated into SQLite to provide a complete and powerful Spatial DBMS (mostly OGC-SFS compliant). Using SQLite + SpatiaLite you can effectively deploy an alternative open source Spatial DBMS roughly equivalent to PostgreSQL + PostGIS. The difference between them is mainly architecture: PostgreSQL + PostGIS uses a client/server architecture suitable for sophisticated Spatial Data infrastructures at the cost of complexity; SQLite + SpatiaLite has much simpler architecture more appropriate for desktop, stand-alone, and personal activities.
> SpatiaLite supports direct SQL access to several commonly used external datasources: ESRI Shapefiles, DBF Archive Files, TXT/CSV/XLS ...
> SpatiaLite actively supports many alternative standard Geometry notations: WKT [Well Known Text] and WKB [Well Known Binary], PostGIS own EWKT and EWKB [Extended WKT / WKB], GML [Geography Markup Language], KML [Keyhole Markup Language, used by Google Maps and Google Earth], GeoJSON [Geometry Java Script Object Notation], SVG [Scalable Vector Graphics].
[1]: https://www.gaia-gis.it/gaia-sins/splite-doxy-5.0.1/index.ht...