Open mdsumner opened 2 weeks ago
Thanks for the description of this.
maybe we want different behaviour for positive-y cases
Ideally display should do what QGIS does. However, gdalraster currently implements the GDAL raster data model and does not yet implement the multidimensional raster data model. So I'm unsure if/how this should be handled at the moment. We get the correct plot orientation and bbox on the netCDF "classic raster" as expected (i.e., with ds <- new(GDALRaster, 'NETCDF:"in.nc":air_temperature_2m')
).
Support for multidim raster should be added eventually. Please let me know if you have other suggestions for the meantime though.
this had me going for a while, read the raster here when it is created by gdalmdimtranslate:
https://github.com/OSGeo/gdal/issues/11041
Essentially $bbox() is (xmin, ymax, xmax, ymin) and this controls the plot orientation.
It presents genuinely "upside down", because the R plot axis is inverted. (The contours are me adding a terra version of elevation to the map, which also surprisingly adds to the plot correctly - I guess because rasterImage() and plot() generally allows inversion ...)
I'm not saying this is a problem ... just wanted to share it, because maybe we want different behaviour for positive-y cases.