I have a cloud-optimised GeoTIFF which plots fine in QGIS, but when I plot it using your example code, the lower co-ordinate becomes the upper co-ordinate and the image is drawn upside down from there.
As you can see, it's primarily stolen from your own example, with just a modified pixelValuesToColorFn.
If I run gdalinfo on it, I get the (probably pertinent) information:
Corner Coordinates:
Upper Left ( 318656.940, 9468502.080) ( 55d21'53.36"E, 4d48'23.59"S)
Lower Left ( 318656.940, 9495708.080) ( 55d21'55.42"E, 4d33'37.91"S)
Upper Right ( 337988.940, 9468502.080) ( 55d32'20.76"E, 4d48'25.02"S)
Lower Right ( 337988.940, 9495708.080) ( 55d32'22.60"E, 4d33'39.26"S)
Center ( 328322.940, 9482105.080) ( 55d27' 8.04"E, 4d41' 1.46"S)
whereby the "upper" corner is further south than the "lower" one. But, as I say, it works in QGIS, so the necessary information to plot it the right way up must be present somewhere.
Any help you can give me would be most appreciated.
I have a cloud-optimised GeoTIFF which plots fine in QGIS, but when I plot it using your example code, the lower co-ordinate becomes the upper co-ordinate and the image is drawn upside down from there.
I've put the code to reproduce the problem here: https://codepen.io/guygriffiths/pen/abyvJMz
As you can see, it's primarily stolen from your own example, with just a modified
pixelValuesToColorFn
.If I run
gdalinfo
on it, I get the (probably pertinent) information:whereby the "upper" corner is further south than the "lower" one. But, as I say, it works in QGIS, so the necessary information to plot it the right way up must be present somewhere.
Any help you can give me would be most appreciated.