Предполагам (Longitude, l.Latitude)
са на места?
SELECT l.*, ST_CONTAINS(p.boundary, POINT(l.Longitude, l.Latitude))
FROM locations l
CROSS JOIN polyThing p;
SELECT l.*
FROM locations l
JOIN polyThing p
ON ST_CONTAINS(p.boundary, POINT(l.Longitude, l.Latitude))
AND p.testarea = 'Test Area 1';