Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zxy -> xyz in SpatialMixin.tile_exits method #419

Merged
merged 1 commit into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -475,7 +475,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 @@ -928,7 +928,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