getResolution returns wrong resolution for rotated rasters
This code https://github.com/geotiffjs/geotiff.js/blob/4de2c3deb2e751809afada6546330462b9406ae6/src/geotiffimage.js#L859-L861 is only correct when the raster is CRS aligned (ie "not rotated"). If the raster is not CRS aligned the calculated resolution has nothing to do with the actual resolution. It may for instance be 0 or negative. Leading to very strange behaviour like throwing "resolutions must be sorted in descending order"
This old PR against rasterio may be used as inspiration to fix this issue: https://github.com/rasterio/rasterio/pull/61/files
Happened to me. It return a negative value.
I think I'm encountering this issue with a GeoTIFF that is interpreted incorrectly in OpenLayers. (Referenced above) Is there an update on this bug? Would fixing the getResolution function resolve this?