Simplify expression
This commit is contained in:
@@ -132,10 +132,8 @@ const dimensionDefs = ctx => {
|
||||
// This is defined by the ctx.res parameter, which is the number of grid cells per tile linear dimension
|
||||
// (i.e. each tile is divided into ctx.res*ctx.res cells).
|
||||
const gridResolution = ctx => {
|
||||
const factor = 256*0.00028/ctx.res;
|
||||
const minimum_resolution = 2*Math.PI*6378137/Math.pow(2,38);
|
||||
let minimum_scale_denominator = minimum_resolution/factor;
|
||||
return `(${factor}*GREATEST(!scale_denominator!,${minimum_scale_denominator}))::double precision`;
|
||||
return `GREATEST(${256*0.00028/ctx.res}*!scale_denominator!, ${minimum_resolution})::double precision`;
|
||||
};
|
||||
|
||||
// Notes:
|
||||
|
||||
Reference in New Issue
Block a user