I have two tables one called test lines and other points called testepoint with some geometries drawn in QGIS to test my sql. Are as in the image below:
I want to select the points that inteceptam a row, the result should return me the id of these three points:
This is my sql that returns no records:
Select testepoint."id" FROM testepoint inner JOIN teste ON ST_Intersects(teste.geom, testepoint.geom)
Can anyone help me on what I might be doing wrong? I drew the shapes in QGIS using Google Streets layer based on EPSG: 3857 and carried in PostGIS
I ran the sql:
Select testepoint."id" FROM testepoint inner JOIN teste ON ST_DWithin(teste.geom, testepoint.geom, 1) WHERE teste."id"= 1
But I need this order: 1,2,4 The order of alignment.