Fix query to make the proper transformations

remotes/origin/1117-camshaft-update
Daniel García Aubert 5 years ago
parent c877d0b964
commit ea1f43bec7

@ -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_Transform(
ST_Buffer(
ST_Transform(
ST_SetSRID(ST_Point(${lng},${lat}), ${srid}),
4326
)::geography,
${radius}
)::geometry,
${srid}
)
)
`;

Loading…
Cancel
Save