Fix query to make the proper transformations
This commit is contained in:
parent
c877d0b964
commit
ea1f43bec7
@ -9,12 +9,15 @@ function filterQueryTpl ({ sql, column, srid, lng, lat, radius } = {}) {
|
||||
WHERE
|
||||
ST_Intersects(
|
||||
${column},
|
||||
ST_Transform(
|
||||
ST_Buffer(
|
||||
ST_Transform(
|
||||
ST_SetSRID(ST_Point(${lng},${lat}), 4326),
|
||||
${srid}
|
||||
),
|
||||
ST_SetSRID(ST_Point(${lng},${lat}), ${srid}),
|
||||
4326
|
||||
)::geography,
|
||||
${radius}
|
||||
)::geometry,
|
||||
${srid}
|
||||
)
|
||||
)
|
||||
`;
|
||||
|
Loading…
Reference in New Issue
Block a user