Make the package cross platform
Main 'bottleneck' is the hdf2ndvi function and perhaps also processLandsat
Proper use of tmp files is necessary if an intermediary gdal_translate.py method is to be used.
#To get a single sds as a rasterLayer object sds <- get_subdatasets('/full/path/to/file.hdf') tmp <- rasterTmpFile() extension(tmp) <- 'tif' gdal_translate(sds[1], dst_dataset = tmp) # Check the ot = argument as well r <- raster(tmp)
#Check whether the first argument of gdal_translate can be a list, hence producing a multilayer raster object.
nice!
On Wed, Sep 10, 2014 at 3:10 PM, Loïc Dutrieux [email protected] wrote:
To get a single sds as a rasterLayer object
sds <- get_subdatasets('/full/path/to/file.hdf') tmp <- rasterTmpFile() extension(tmp) <- 'tif' gdal_translate(sds[1], dst_dataset = tmp) # Check the ot = argument as well r <- raster(tmp)
#Check whether the first argument of gdal_translate can be a list, hence producing a multilayer raster object.
— Reply to this email directly or view it on GitHub https://github.com/dutri001/bfastSpatial/issues/14#issuecomment-55112299 .