I am new to the GIS world but I have experience in programming. I am trying to build an app where users draw circles on a leaflet map and it returns the zipcodes "touched", but I think the right term is overlapped, by the circles. I have a table in PostGIS where I have uploaded the US census zipcodes; the column to query is a geometry type which return something like this when transformed as GeoJSON:
And this is an example of the map with a circle drawn where I console log its radius and center coordinates (lat, lng):
So far I have tried this query:
SELECT * FROM tl_2019_us_zcta510 AS b WHERE ST_DWithin(b.geom, ST_Transform( ST_SetSrid( ST_MakePoint(lat_from_leaflet,lng_from_leaflet) ,4269) ,4269) ,radius_from_leaflet);
This isn't returning the correct zipcodes because when I try with a small circle, for example, it doesn't return any row, but I am expecting at least one row.