Skip to content

Commit

Permalink
update variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Apr 7, 2021
1 parent 17dc867 commit be4461a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rio_tiler/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ def get_vrt_transform(
# Warns when the read resolution (tile, part) is lower than the
# resolution of the smaller overview. This will result in rasterio/rio-tiler
# creating a big WarpedVRT and trying to read a small part of it.
max_ovr_dec = max(src_dst.overviews(1))
max_native_res = max(abs(vrt_transform.a), abs(vrt_transform.e)) * max_ovr_dec
max_ovr_dec = max(src_dst.overviews(1) or [1])
overview_res = max(abs(vrt_transform.a), abs(vrt_transform.e)) * max_ovr_dec
dst_res = max((abs(tile_transform.a), abs(tile_transform.e)))
if max_native_res < dst_res:
if overview_res < dst_res:
warnings.warn("Trying to fetch lower resolution than min overview resolution")

return vrt_transform, vrt_width, vrt_height
Expand Down

0 comments on commit be4461a

Please sign in to comment.