I'm capturing tweets and saving them into a PostgreSQL table like:
CREATE TABLE tweets ( id bigint, location point )
And I'd like to select all tweets within a radius from a city, ie:
Buenos Aires (lat: -34.603722, lon: -58.381592, radius: 2Km)
As far I could understand I need to run a query similar to:
SELECT * FROM tweets WHERE location <@ circle '((-34.603722, -58.381592), 2000)'
I'm not sure if this approach makes sense, can I use Latitude/Longitude on simple PostgreSQL? Or I need to install PostGIS, I rather prefer not having more dependencies if it is possible.
I saw a few posts where people says a point should be
(longitude, latitude) and I'm not sure unit is metric (meters) or imperial (miles).
Contained in operator