I have very little knowledge and understanding Postgres/PostGIS. I am having trouble by using the ST_PointInsideCircle function for radius that uses miles or meters or degrees.
I think this function expects degrees in radius parameter. I have a table with all zip codes with lat/long and I have input with lat/long/radius (miles).
I need to select all the ZIP codes found inside that radius and provided lat/long.
Can anyone help me to find right function or script?
Postgres 9.5 /PostGIS installed.
lat=37.6210700000000031,
long=-122.429737000000003,
radius=5 miles
my code :
SELECT zip_code from mytable
where ST_PointInsideCircle(ST_Point(mytable.latitude,mytable.longitude), 37.6210700000000031, -122.429737000000003, 5);