I use the Python sqlite3 library as well as the SQLite3 CLI.
I am also using the Distance function with the use_ellipsoid
parameter, to get the distance between two geometries in meters.
Whenever the geometries touch, I get NULL instead of 0.0 m distance. The exact value of use_ellipsoid
does not matter.
An example:
.load 'mod_spatialite.so'
SELECT InitSpatialMetaData(1);
SELECT DISTANCE(MakePoint(13.41, 52.525), MakePoint(13.41, 52.525), 1);
It just returns NULL, respectively, None in Python. If I change one of the points, everything seems to work fine, so it is not a CRS issue.
Is this supposed to be like this? Am I doing or expecting something wrong?