I am trying to select lines that completely touch a polygon (not at just a single point).
However, this is not the case as you can see in the following picture.
I would like to only have the highlight yellow lines returned. What am I doing wrong?
(I could solve it with a string comparison, but I would like to avoid the extra "st_astext" invocation).
SELECT a.geometry, a.id as a_id, b.FID as b_id, st_astext(ST_GeometryN(st_difference(a.geometry,b.geometry),1)) as st_difference, st_isempty(ST_GeometryN(st_difference(a.geometry,b.geometry),1)) as st_isempty FROM a INNER JOIN b ON st_touches(a.geometry,b.geometry)