[gdal-dev] Binary Predicates in SQLite SQL dialect

Andre Vautour andre.vautour at caris.com
Tue Sep 30 11:20:14 PDT 2014


Hi all,

I am trying to use a geometry binary predicate (ST_Intersects) in 
ExecuteSQL() with the SQLite dialect and keep getting back an 
"ST_Intersect function does not exist" error back from SQLite.

GDAL is built with SpatiaLite (HAVE_SPATIALITE is defined), but I 
believe the problem is that SpatiaLite is built without GEOS in our 
case, so those predicate functions end-up not being available in 
SpatiaLite. The end result is that OGRSQLiteRegisterSQLFunctions does 
not add the OGR-based predicate functions as SpatiaLite is present, but 
SpatiaLite does not contain the predicate functions.

I would build SpatiaLite with GEOS support, but unfortunately its LGPL 
licensing is too restrictive for our application. So, would it make 
sense to change the logic in OGRSQLiteRegisterSQLFunctions to account 
for the case of SpatiaLite being built without GEOS?

André


More information about the gdal-dev mailing list