Skip to content

MODIStsp failed in to reproject from hdf to WGS84 #226

@cedlfc44

Description

@cedlfc44

HI:
Im working into a researh, so i need to change crs from MODIS images during downloads.
So, i working with MODIStsp function, but after finish to create hdf files in my cpu, a fail is occuring. BUT, when, i put #output_proj, download works fine.

thanks for your help

Script
 rm(list=ls(all=TRUE))
 library(MODIStsp)  
 library(bench)
 library(sp)
 library(rgdal)   
 
 MTSP_fechas <- read.csv(file = "./fechas_imagenes_MODIS_tsp.txt")
 class(MTSP_fechas[1,1])
 
 for (ll in 1:24) {
 MODIStsp_get_prodlayers("M*D13Q1")
 spatial_file <- system.file("testdata/lakeshapes/cercado.shp", package = "MODIStsp")
 
 MTSP_descarga<-MODIStsp(gui             = FALSE,
         spatmeth        = "file",
         spafile         = spatial_file,  
         out_folder      = "$tempdir",
         selprod         = "Vegetation Indexes_16Days_250m (M*D13Q1)",
         bandsel         = c("EVI"),
         output_proj = st_as_text(st_crs(4326)),
         # output_proj     = "EPSG:4326",
         # output_proj     = "+proj=longlat +datum=WGS84 +no_defs",
         user            = "********" ,
         password        = "**********",
         start_date      = MTSP_fechas[ll,1],  
         end_date        = MTSP_fechas[ll,1],
         verbose         = FALSE)

 out_fold <- file.path(tempdir(), "MODIStsp/cercado/VI_16Days_250m_v6/") 

FAIL
Error in gdal_utils("buildvrt", gdalfile, output.vrt, opts) :
gdal_utils buildvrt: an error occured
Además: Warning message:
In CPL_gdalbuildvrt(source, destination, options, oo, quiet) :
GDAL Error 5: Invalid user extent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions