Skip to content

Commit

Permalink
zxy -> xyz in SpatialMixin.tile_exits method (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago authored Sep 22, 2021
1 parent e3b3302 commit a538dd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions rio_tiler/io/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
)
Expand Down Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion rio_tiler/io/cogeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down

0 comments on commit a538dd2

Please sign in to comment.