-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Labels
Description
Min/Max Zoom
from rio_tiler.io import Reader
with Reader("tests/fixtures/cog_dateline.tif") as src:
print(src.minzoom, src.maxzoom)
4 4but it should be 7 -> 11
The issue is that rasterio's calculate_default_transform doesn't seems to handle well the dateline crossing dataset.
Potential fix in https://github.com/cogeotiff/rio-tiler/blob/main/rio_tiler/io/rasterio.py#L147-L153
vrt_options = {"add_alpha": True}
if self.dataset.nodata is not None:
vrt_options.update(
{
"nodata": self.dataset.nodata,
"add_alpha": False,
"src_nodata": self.dataset.nodata,
}
)
if has_alpha_band(self.dataset):
vrt_options.update({"add_alpha": False})
with WarpedVRT(self.dataset, **vrt_options) as vrt:
dst_affine = list(vrt.transform)
w = vrt.width
h = vrt.heightDst Transform
same as ☝️ in https://github.com/cogeotiff/rio-tiler/blob/main/rio_tiler/utils.py#L354-L356
Reactions are currently unavailable