[R-sig-Geo] Data conversion

Fatih Kara m@|k@r@ @end|ng |rom y@ndex@com
Tue Aug 27 21:45:46 CEST 2019


Hi, 

I have a very simple problem which I couldn't solve nowadays: I can't convert '.hdf' files to '.tif' files.

I use this code: 

install.packages("raster",dependencies = TRUE)
install.packages("rgdal",dependencies = TRUE)
install.packages("rgeos",dependencies = TRUE)
install.packages("sp",dependencies = TRUE)
install.packages("lwgeom", dependencies = TRUE)
library(raster)
library(lwgeom)
library(maptools)
library(rgdal)
library(gdalUtils)

subsets <- gdalUtils::get_subdatasets("modisndvi.hdf"[1])
gdalUtils::gdal_translate(src_dataset = subsets[1], dst_dataset = "modisndvi.tiff")

NULL

What can I do?

-- 
Fatih Kara



More information about the R-sig-Geo mailing list