Fix grid-point aggregation placement

This commit is contained in:
Javier Goizueta 2017-12-18 15:48:51 +01:00
parent a40bc4a527
commit e97147ddb4

View File

@ -156,7 +156,7 @@ const aggregationQueryTemplates = {
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
ST_SetSRID(ST_MakePoint((_cdb_gx+0.5)*res, (_cdb_gy+0.5)*res), 3857) AS the_geom_webmercator
${dimensionNames(ctx)}
${aggregateColumnNames(ctx)}
FROM _cdb_clusters, _cdb_params