diff --git a/rio_tiler/io/base.py b/rio_tiler/io/base.py index 76205be3..ecfb14c8 100644 --- a/rio_tiler/io/base.py +++ b/rio_tiler/io/base.py @@ -57,7 +57,7 @@ def spatial_info(self) -> SpatialInfo: maxzoom=self.maxzoom, ) - def tile_exists(self, tile_z: int, tile_x: int, tile_y: int) -> bool: + def tile_exists(self, tile_x: int, tile_y: int, tile_z: int) -> bool: """Check if a tile intersects the dataset bounds. Args: @@ -487,7 +487,7 @@ def tile( rio_tiler.models.ImageData: ImageData instance with data, mask and tile spatial info. """ - if not self.tile_exists(tile_z, tile_x, tile_y): + if not self.tile_exists(tile_x, tile_y, tile_z): raise TileOutsideBounds( f"Tile {tile_z}/{tile_x}/{tile_y} is outside image bounds" ) @@ -944,7 +944,7 @@ def tile( rio_tiler.models.ImageData: ImageData instance with data, mask and tile spatial info. """ - if not self.tile_exists(tile_z, tile_x, tile_y): + if not self.tile_exists(tile_x, tile_y, tile_z): raise TileOutsideBounds( f"Tile {tile_z}/{tile_x}/{tile_y} is outside image bounds" ) diff --git a/rio_tiler/io/cogeo.py b/rio_tiler/io/cogeo.py index a7e62d11..0a8ddf2b 100644 --- a/rio_tiler/io/cogeo.py +++ b/rio_tiler/io/cogeo.py @@ -276,7 +276,7 @@ def tile( rio_tiler.models.ImageData: ImageData instance with data, mask and tile spatial info. """ - if not self.tile_exists(tile_z, tile_x, tile_y): + if not self.tile_exists(tile_x, tile_y, tile_z): raise TileOutsideBounds( f"Tile {tile_z}/{tile_x}/{tile_y} is outside {self.filepath} bounds" )