@ -9,12 +9,15 @@ function filterQueryTpl ({ sql, column, srid, lng, lat, radius } = {}) {
WHERE
ST_Intersects(
${column},
ST_Buffer(
ST_Transform(
ST_SetSRID(ST_Point(${lng},${lat}), 4326),
${srid}
),
${radius}
ST_SetSRID(ST_Point(${lng},${lat}), ${srid}),
4326
)::geography,
)::geometry,
)
`;