Redefine aggregation torque to match Torque

Now the resolution aggregation parameter has the same meaning as in Torque (-torque-resolution in CartoCSS)
This commit is contained in:
Javier Goizueta 2017-12-14 17:03:49 +01:00
parent 9d8ce6bc44
commit f95c310462
2 changed files with 4 additions and 3 deletions

View File

@ -19,13 +19,14 @@ const templateForOptions = (options) => {
/**
* Generates an aggregation query given the aggregation options:
* - query
* - resolution
* - resolution - defined as in torque:
* aggregation cell is resolution*resolution pixels, where tiles are always 256x256 pixels
* - columns
* - placement
*/
const queryForOptions = (options) => templateForOptions(options)({
sourceQuery: options.query,
res: options.resolution,
res: 256/options.resolution,
columns: options.columns
});

View File

@ -6,7 +6,7 @@ module.exports = class Aggregation {
}
constructor (mapconfig, query, {
resolution = 256,
resolution = 1,
threshold = Aggregation.THRESHOLD,
placement = 'centroid',
columns = {}