I have a MultiPoint geometry column which has only one point (DB is a live server which cannot be changed now).
I need to find all points within a certain distance from a fixed point I provide to the query.
I tried to extract a point from the MultiPoint and use that as data for the
ST_DWithin query but I still get a
"Operation on mixed SRID geometries" error.
My query is as below:
SELECT o.id, ST_AsText(o.geom) FROM table AS o LEFT JOIN ( SELECT id, ST_GeometryN(geom, 1) AS pt FROM table ) AS p ON o.id = p.id WHERE ST_DWithin(p.pt, ST_MakePoint(-112.779861,52.193760)::geography, 1000);