Fix bug in point-grid aggregation
This commit is contained in:
parent
bcfc43a517
commit
daa3fdca11
@ -50,6 +50,7 @@ const SUPPORTED_AGGREGATE_FUNCTIONS = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const aggregateColumns = ctx => {
|
const aggregateColumns = ctx => {
|
||||||
|
// TODO: always add count
|
||||||
let columns = ctx.columns || {};
|
let columns = ctx.columns || {};
|
||||||
if (Object.keys(columns).length === 0) {
|
if (Object.keys(columns).length === 0) {
|
||||||
// default aggregation
|
// default aggregation
|
||||||
@ -117,7 +118,7 @@ const aggregationQueryTemplates = {
|
|||||||
GROUP BY _cdb_gx, _cdb_gy
|
GROUP BY _cdb_gx, _cdb_gy
|
||||||
)
|
)
|
||||||
SELECT
|
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*(res+0.5), _cdb_gy*(res+0.5)), 3857) AS the_geom_webmercator,
|
||||||
_cdb_feature_count
|
_cdb_feature_count
|
||||||
FROM _cdb_clusters, _cdb_params
|
FROM _cdb_clusters, _cdb_params
|
||||||
`,
|
`,
|
||||||
|
Loading…
Reference in New Issue
Block a user