Comment how the max overview level is defined
This commit is contained in:
@@ -1,7 +1,16 @@
|
|||||||
|
-- Maximum zoom level for which overviews may be created
|
||||||
CREATE OR REPLACE FUNCTION _CDB_MaxOverviewLevel()
|
CREATE OR REPLACE FUNCTION _CDB_MaxOverviewLevel()
|
||||||
RETURNS INTEGER
|
RETURNS INTEGER
|
||||||
AS $$
|
AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
|
-- Zoom level will be limited so that both tile coordinates
|
||||||
|
-- and gridding coordinates within a tile up to 1px
|
||||||
|
-- (i.e. tile coordinates / 256)
|
||||||
|
-- can be stored in a 32-bit signed integer.
|
||||||
|
-- We have 31 bits por positive numbers
|
||||||
|
-- For zoom level Z coordinates range from 0 to 2^Z-1, so they
|
||||||
|
-- need Z bits, and need 8 bits more to address pixels within a tile
|
||||||
|
-- (gridding), so we'll limit Z to a maximum of 31 - 8
|
||||||
RETURN 23;
|
RETURN 23;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE PLPGSQL IMMUTABLE;
|
$$ LANGUAGE PLPGSQL IMMUTABLE;
|
||||||
|
|||||||
Reference in New Issue
Block a user