-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
Description
By design rio-tiler assume you are working within the native zoom range of your data (raw data = Max res, max res/number of overviews ~= minzoom).
When reading a file, we always use a VRT to align the data to the bounds
/size
we want to read. This is all defined in
Lines 172 to 188 in ccf6aa0
tile_transform = from_bounds(w, s, e, n, width, height) | |
w_res = ( | |
tile_transform.a | |
if abs(tile_transform.a) < abs(dst_transform.a) | |
else dst_transform.a | |
) | |
h_res = ( | |
tile_transform.e | |
if abs(tile_transform.e) < abs(dst_transform.e) | |
else dst_transform.e | |
) | |
vrt_width = math.ceil((e - w) / w_res) | |
vrt_height = math.ceil((s - n) / h_res) | |
vrt_transform = from_bounds(w, s, e, n, vrt_width, vrt_height) | |
return vrt_transform, vrt_width, vrt_height |
(this part was copie from rasterio/rasterio#1373 (comment))
if you try to read a really low version of your data, we will first create a huge VRT and then ask to read a decimated part of it (this is to make sure we read the overview).
To be honest, for now I'm not sure there is a solution for this.