Fix point-grid aggregation bug

This commit is contained in:
Javier Goizueta
2017-12-15 10:52:41 +01:00
parent 55d9c02f8d
commit 81e54660bb
@@ -153,7 +153,7 @@ const aggregationQueryTemplates = {
${aggregateColumnDefs(ctx)}
FROM (${ctx.sourceQuery}) _cdb_query, _cdb_params
WHERE the_geom_webmercator && _cdb_params.bbox
GROUP BY _cdb_gx, _cdb_gy ${dimensionNames}
GROUP BY _cdb_gx, _cdb_gy ${dimensionNames(ctx)}
)
SELECT
ST_SetSRID(ST_MakePoint(_cdb_gx*(res+0.5), _cdb_gy*(res+0.5)), 3857) AS the_geom_webmercator