-
Notifications
You must be signed in to change notification settings - Fork 108
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
Investigate weird output resolution after #648 #654
Comments
Ok I think I know what's going on! The file has bounds: Lines 247 to 249 in dc7e87d
files looks good in EPSG:4326 projection import rasterio
from rasterio.warp import calculate_default_transform
from rasterio.warp import transform_bounds
bbox = (-160, -70, 160, 70)
print("bbox read: ", bbox)
b = transform_bounds("epsg:4326", "epsg:3857", *bbox)
print("bbox read (epsg: 3857): ", b)
w, s, e, n = b
print()
with rasterio.open("tests/fixtures/cog_nasa.tif") as src_dst:
print("dataset bbox :", src_dst.bounds)
dst_transform, _, _ = calculate_default_transform(
src_dst.crs, "epsg:3857", src_dst.width, src_dst.height, *src_dst.bounds
)
print("res: ", dst_transform.a, dst_transform.e)
vrt_width = round((e - w) / dst_transform.a)
vrt_height = round((s - n) / dst_transform.e)
print("vrt_size: ", vrt_height, vrt_width)
print()
# Validate Theory using a file which do not cross the WebMercator Bounds
with rasterio.open("tests/fixtures/cog_nasa_crop.tif") as src_dst:
print("dataset bbox :", src_dst.bounds)
dst_transform, _, _ = calculate_default_transform(
src_dst.crs, "epsg:3857", src_dst.width, src_dst.height, *src_dst.bounds
)
print("res: ", dst_transform.a, dst_transform.e)
vrt_width = round((e - w) / dst_transform.a)
vrt_height = round((s - n) / dst_transform.e)
print("vrt_size: ", vrt_height, vrt_width)
bbox read: (-160, -70, 160, 70)
bbox read (epsg: 3857): (-17811118.526923772, -11068715.659379492, 17811118.526923772, 11068715.659379492)
dataset bbox : BoundingBox(left=-180.0, bottom=-90.0, right=180.0, top=90.0)
res: 604620.393207253 -604620.393207253
vrt_size: 37 59
dataset bbox : BoundingBox(left=-170.0, bottom=-80.0, right=170.0, top=80.0)
res: 65163.8369659509 -65163.8369659509
vrt_size: 340 547 |
# What Pin a post rio-tiler release that supports zonal statistics upgrades while a map zooming issue is investigated # Why cogeotiff/rio-tiler#654
This is hitting us as well. Reproduction case:
|
with rio-tiler
6.2.4
with rio-tiler
6.2.3
data: cog_nasa.tif.zip
Pretty sure this is due to the change in #648
The text was updated successfully, but these errors were encountered: