Skip to content

read low resolution version of the data #348

@vincentsarago

Description

@vincentsarago

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

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions