<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div style="font-family:Arial;">Hi Andy,<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">gdalinfo is the tool that displays information about rasters. Yours is 337x217 pixels, with a 337x24 block size, which is completely unrelated to the OL tiling grid, and there's no -256 here.<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">The only unusual thing about your image is that instead of the customary positive X, negative Y cell spacing, it has (-70, 70) meters. This can sometimes cause problems, even for GDAL. OL might be assuming negative Y spacing, ending up with a negative size later.<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">I think you can fix it by flipping the image pixels in both directions, then updating the geotransform.<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">Regards,<br></div><div style="font-family:Arial;">Laurentiu<br></div><div style="font-family:Arial;"><br></div><div>On Wed, May 17, 2023, at 09:27, andy wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div>Hi,<br></div><div>I've been having trouble using a tiff on openlayers, and I've found that it depends on it having a negative tile height (-256).<br></div><div>This is the tiff: <a href="https://andy-aws.s3.eu-north-1.amazonaws.com/sample_dnw_byte.tiff">https://andy-aws.s3.eu-north-1.amazonaws.com/sample_dnw_byte.tiff</a><br></div><div><br></div><div>I'm able to read tiles size in OL, using this<br></div><div><br></div><div><div>  source.getView().then(() => {<br></div><div>    console.log(source.getTileGrid());<br></div><div>  });<br></div></div><div><br></div><div>Is there some gdal CLI to read tiles size?<br></div><div>Using gdalinfo it seems to me that I do not have it.<br></div><div><br></div><div><div>Thank you<br></div><div><br></div><div><span class="qt-gmail_signature_prefix">--</span><br></div><div dir="ltr" class="qt-gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><span class="size" style="font-size:small;">___________________</span><br></div><div dir="ltr"><span class="size" style="font-size:small;"></span><br></div><div dir="ltr"><div>Andrea Borruso<br></div><div> website: <a href="https://medium.com/tantotanto" target="_blank">https://medium.com/tantotanto</a><br></div><div>38° 7' 48" N, 13° 21' 9" E, EPSG:4326<br></div><div><span class="size" style="font-size:small;">___________________</span><br></div><div> <br></div><div> "cercare e saper riconoscere chi e cosa,<br></div><div>  in mezzo all’inferno, non è inferno, <br></div><div> e farlo durare, e dargli spazio"<br></div><div> <br></div><div> Italo Calvino<br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div>_______________________________________________<br></div><div>gdal-dev mailing list<br></div><div><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></div><div><br></div></blockquote><div style="font-family:Arial;"><br></div></body></html>