Skip to content

Commit

Permalink
Fix min_resolution_seed handling in server
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-morvan committed Jan 15, 2025
1 parent b51f38c commit 9ed1069
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tilecloud_chain/internal_mapcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ def delete_one(self, tile: Tile) -> Tile:
def _get_key(self, tile: Tile) -> str:
keys = [
self._prefix,
tile.metadata['config_file'],
tile.metadata['layer'],
tile.metadata["config_file"],
tile.metadata["layer"],
tile.tilecoord.z,
tile.tilecoord.x,
tile.tilecoord.y
tile.tilecoord.y,
] + [value for key, value in tile.metadata.items() if key.startswith("dimension_")]
return "_".join([str(key) for key in keys])

Expand Down
2 changes: 1 addition & 1 deletion tilecloud_chain/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def get_max_zoom_seed(config: tilecloud_chain.DatedConfig, layer_name: str) -> i
if "min_resolution_seed" in layer:
max_zoom_seed = -1
for zoom, resolution in enumerate(config.config["grids"][layer["grid"]]["resolutions"]):
if resolution > layer["min_resolution_seed"]:
if resolution >= layer["min_resolution_seed"]:
max_zoom_seed = zoom
return max_zoom_seed
else:
Expand Down

0 comments on commit 9ed1069

Please sign in to comment.