FYI: pitfall using spatialite intersects() etc.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

FYI: pitfall using spatialite intersects() etc.

Kai Borgolte
Hi,

as regular user of PostGIS I was baffled that a virtual layer containing

WHERE st_intersects(t2.geometry, t1.geometry)

gave seemingly wrong results. Reading the docs:

"The return type is Integer, with a return value of 1 for TRUE, 0 for
FALSE, and –1 for UNKNOWN corresponding to a function invocation on NULL
arguments"

So UNKNOWN -> -1 -> True will join null geometries with each other
geometry. There is probably not much QGIS can do about this. Changed the
query in

WHERE st_intersects(t2.geometry, t1.geometry) = 1
--
Kai Borgolte, Bonn
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user