see if gdal understands the coordinate arrays already, you can just churn
it through the warper, otherwise construct a vrt that specifies them, which
is a bit obscure how you do it admittedly - but this is a gdal not an R
topic.
Best
On Mon, 15 Nov 2021, 00:22 Edzer Pebesma,
wrote:
>
> On 14/
On 14/11/2021 13:59, Edzer Pebesma wrote:
Gabriel shared the data with me (off-list, 1Gb) and it contains two hdf5
datasets, one containing the raster of the longitude and latitude, the
other rasters with the attributres (LST) but no coordinates. I could get
a (rough: factor 50 downsampling)
Hello Edzer,
Thanks a lot.
The scaling factor to convert to LST is 0.02
Regards,
Gabriel
On Sun, Nov 14, 2021 at 2:59 PM Edzer Pebesma
wrote:
> Gabriel shared the data with me (off-list, 1Gb) and it contains two hdf5
> datasets, one containing the raster of the longitude and latitude, the
> othe
Gabriel shared the data with me (off-list, 1Gb) and it contains two hdf5
datasets, one containing the raster of the longitude and latitude, the
other rasters with the attributres (LST) but no coordinates. I could get
a (rough: factor 50 downsampling) plot with stars using:
library(stars)
lat
This might be because the grid is not regular but possibly curvilinear,
having two raster layers with the lon & lat values for each pixel. Can
you share a sample data set?
On 14/11/2021 10:47, Gabriel Cotlier wrote:
Dear Michael,
Following your advice I have tired :
library(terra)
library(ra
Dear Michael,
Following your advice I have tired :
library(terra)
library(raster)
library(dplyr)
r = terra::rast(file.choose())
plot(r$LST)
r_lst = r$LST
r_lst %>% raster()
plot(r_lst)
Then I effectively get a raster layer format from the raster package as I
wanted, but looking at the plot and
Dear Michael Summer,
Thanks a lot for your swift reply.
I will give a try to the procedure you mentioned.
Kind regards,
Gabriel
On Sat, Nov 13, 2021 at 12:14 PM Michael Sumner wrote:
> try terra::rast() or stars::read_stars() on the file, both use gdal to
> interrogate and read. What you get de
try terra::rast() or stars::read_stars() on the file, both use gdal to
interrogate and read. What you get depends on the structure of the files,
variables interpreted as subdatasets. stars is more general but sees
variables as 2D arrays with bands, terra calls these bands layers.
Alternatively try
Hello,
I would like to be able to visualize / plot a specific data layer within
the structure a hierarchical data file format .h5 in R. I could observe
the structure as follows :
library(rhdf5)
r= h5ls(file.choose())
r
and also in this way identify the Group and Name of the data to be plotted,