I try to snap a line to a polygon boundary. This is working fine, due using the snapping option in QGIS (snap mode vertex and segments & tolerance 0 pixels)
Line 1 is snapping to the polygon segment.
If I export these geometries to PostGIS and do a ST_relate test with line1 and polygon, I don't get the expected result:
I would aspect that touching is true
SELECT st_touches (line.geom, poly.geom) FROM snapping_line line,snapping_poly poly; SELECT st_relate (line.geom, poly.geom) FROM snapping_line line,snapping_poly poly;
But touches is false and st_relate is completely not what I'm expecting with snapping: 10F0FF212
I get the correct result if I snap the line to polygon vertexes (Line 2) with touching true and correct st_relate FF1F0F212
So now, where is the error? Is snapping not working correctly? Why is the result different between vertex and segment snapping. I am using QGIS 3.4.4-Madeira on Windows and Ubuntu