Closed vlarmet closed 4 years ago
Thank you for reporting this. The data are written from bottom to top instead of the other (more common) way. I deal with that for some "native" formats, and I assumed that rgdal would handle that for data read via GDAL. But, alas, it does not (it does give a warning).
library(rgdal)
f <- "9s5p_no2_20180701T161259_20180707T175356.tif"
a <- readGDAL(f)
# s5p_no2_20180701T161259_20180707T175356.tif has GDAL driver GTiff
# and has 148 rows and 475 columns
# Warning message:
# In readGDAL(f) : Y axis resolution positive, examine data for flipping
I'll investigate fixing this; but will add a warning for now, suggesting to use flip
in a work-around:
library(raster)
x <- brick(f)
x <- flip(x, "y")
The terra
package (>= 0.7-4) reads these data correctly.
s5p_no2_20180701T161259_20180707T175356.zip
Hi,
When I import this raster (attached file) to R and plot it, the latitude are flipped. It's a NO2 raster from sentinel in WGS84. However, it is correctly displayed in QGIS.
My session info :