Minor style formats

This commit is contained in:
Daniel García Aubert
2017-12-19 16:17:37 +01:00
parent 4946ca688c
commit cc9b190e5d
@@ -118,7 +118,8 @@ const gridResolution = ctx => `(${256*0.00028/ctx.res}*!scale_denominator!)::dou
const aggregationQueryTemplates = {
'centroid': ctx => `
WITH _cdb_params AS (
WITH
_cdb_params AS (
SELECT
${gridResolution(ctx)} AS res,
!bbox! AS bbox
@@ -142,7 +143,8 @@ const aggregationQueryTemplates = {
`,
'point-grid': ctx => `
WITH _cdb_params AS (
WITH
_cdb_params AS (
SELECT
${gridResolution(ctx)} AS res,
!bbox! AS bbox
@@ -165,11 +167,13 @@ const aggregationQueryTemplates = {
`,
'point-sample': ctx => `
WITH _cdb_params AS (
WITH
_cdb_params AS (
SELECT
${gridResolution(ctx)} AS res,
!bbox! AS bbox
), _cdb_clusters AS (
),
_cdb_clusters AS (
SELECT
MIN(cartodb_id) AS cartodb_id
${dimensionDefs(ctx)}
@@ -180,7 +184,8 @@ const aggregationQueryTemplates = {
Floor(ST_X(_cdb_query.the_geom_webmercator)/_cdb_params.res),
Floor(ST_Y(_cdb_query.the_geom_webmercator)/_cdb_params.res)
${dimensionNames(ctx)}
) SELECT
)
SELECT
_cdb_clusters.cartodb_id,
the_geom, the_geom_webmercator
${dimensionNames(ctx)}
@@ -191,11 +196,13 @@ const aggregationQueryTemplates = {
`,
'full-sample': ctx => `
WITH _cdb_params AS (
WITH
_cdb_params AS (
SELECT
${gridResolution(ctx)} AS res,
!bbox! AS bbox
), _cdb_clusters AS (
),
_cdb_clusters AS (
SELECT
MIN(cartodb_id) AS cartodb_id
${dimensionDefs(ctx)}