You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The downscale tiles mechanism does not work with clip: true inside the coverage parameter of the source.
It was detected as a problem with downscaling #687 but downscaling only fails together with clipping.
Expected Behavior
Tiles should be generated in the missing layers from a higher zoom with clipping.
Actual Behavior
Blank tiles still appear in downscale zoom levels. Although, seeding works fine between min_scale and max_scale of the source.
Possible Fix
The solution found was to modify the file:
/usr/local/lib/python3.10/dist-packages/mapproxy/cache/tile.py In the "_load_tile_coords" function.
Condition ( if not created_tiles and self.rescale_tiles ) has been changed to ( if blank_created_tiles and self.rescale_tiles ).
Added the next code right before the previous condition:
blank_created_tiles = False
for tile in created_tiles:
if tile.source_image().mode == 'RGBA':
if all(tile.source_image().load()[x, y][3] == 0 for x in range(tile.source_image().width) for y in range(tile.source_image().height)) :
blank_created_tiles = True
Steps to Reproduce
Create a cache with zooms that are out of the scale limits of the source.
Add the parameter downscale_tiles with any value greater or equal to 1.
Add a coverage to the source with clip: true and a datasource for the coverage.
Check if there is any blank tile in downscaling zoom levels.
The following configuration shows that there is some incompatibility between the combined use of the datasource and clip: true parameters with downscaling.
If we simply remove the clip: true parameter the following configuration will work, otherwise everything will be blank except the zoom indicated between min_scale and max_scale, which in this case is zoom 12.
Context
The downscale tiles mechanism does not work with clip: true inside the coverage parameter of the source.
It was detected as a problem with downscaling #687 but downscaling only fails together with clipping.
Expected Behavior
Tiles should be generated in the missing layers from a higher zoom with clipping.
Actual Behavior
Blank tiles still appear in downscale zoom levels. Although, seeding works fine between min_scale and max_scale of the source.
Possible Fix
The solution found was to modify the file:
/usr/local/lib/python3.10/dist-packages/mapproxy/cache/tile.py In the "_load_tile_coords" function.
blank_created_tiles = False
for tile in created_tiles:
if tile.source_image().mode == 'RGBA':
if all(tile.source_image().load()[x, y][3] == 0 for x in range(tile.source_image().width) for y in range(tile.source_image().height)) :
blank_created_tiles = True
Steps to Reproduce
The following configuration shows that there is some incompatibility between the combined use of the datasource and clip: true parameters with downscaling.
If we simply remove the clip: true parameter the following configuration will work, otherwise everything will be blank except the zoom indicated between min_scale and max_scale, which in this case is zoom 12.
Context
The aim was to ensure that there were no blank tiles in downscaling zooms in those layers that required it.
Your Environment
The text was updated successfully, but these errors were encountered: