Reputation: 91
I am new to Postgres geo queries, I want to find locations within a 10km radius of a particular point so I came across earthdistance. I installed the extension using CREATE EXTENSION earthdistance;
After that, I ran my query
SELECT *, (point(lng, lat) <@> point(-0.1281552,51.5107975)) AS distance FROM location WHERE (point(lng, lat) <@> point(-0.1281552,51.5107975)) < 10000 ORDER BY distance;
But I am getting this error:
ERROR: function point(text, text) does not exist
LINE 1: select *, point(lng, lat) <@> point(-0.1281552,51.5107975) a...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
I did some search but was not able to find any solution.
Upvotes: 0
Views: 540