This question is, I think, very simple but I can't resolve it by myself.
I have a table 'cable
' like this :
CREATE TABLE cable (
id uuid primary_key,
the_geom geometry(LineString, 2154)
);
And another table let's call it partpoint
CREATE TABLE partpoint (
id uuid primary key,
the_geom geometry(Point, 2154)
);
I want to know if, for a specific partpoint
, this partpoint
is part of linestring in the cable
table. The first request was :
SELECT id
FROM cable
WHERE ST_CONTAINS(the_geom,
(SELECT the_geom
FROM partpoint
WHERE id=<anUuid>))
But this does not work :-( Do I need to loop over all the table ? (with a for loop).
SELECT id, AsEWKT(the_geom) FROM cable LIMIT 5
andSELECT id, AsEWKT(the_geom) FROM partpoint LIMIT 5
. At a guess, you need to handle real number tolerances, but its hard to say without seeing the data.