Better condition
This commit is contained in:
parent
da07d550d2
commit
6e455a1205
@ -8,7 +8,7 @@ function filterQueryTpl ({ sql, column, srid, lng, lat, radiusInMeters } = {}) {
|
||||
FROM (${sql}) _cdb_circle_filter
|
||||
WHERE
|
||||
ST_DWithin(
|
||||
${srid === 3857 ? `ST_Transform(${column}, 4326)::geography` : `${column}::geography`},
|
||||
${srid === 4326 ? `${column}::geography` : `ST_Transform(${column}, 4326)::geography`},
|
||||
ST_SetSRID(ST_Point(${lng}, ${lat}), 4326)::geography,
|
||||
${radiusInMeters}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user