I'm trying to select POIs from around given location within some distance. I tried so far two approaches I found online, but unfortunately none seems to be working - I'm getting no rows despite the fact I can find records from that area by hand.
My current code is:
SELECT * FROM public.planet_osm_point WHERE ST_DWITHIN(public.planet_osm_point.way, ST_TRANSFORM(ST_SETSRID(ST_MAKEPOINT(40.6978,-73.9792),4326),3857), 50);
SELECT * FROM public.planet_osm_point WHERE ST_DWithin( ST_SetSRID(ST_Point(40.6978,-73.9792), 3857), ST_Transform(public.planet_osm_point.way, 3857), 500 ) LIMIT 200;