1

I'm having trouble batch downloading MODIS products with the rts package in R. I'm using the code below to download the MODIS products:

library(rts)
library(raster)
library(RCurl)

bands = "0,1,0,0,1,0,0,0,0,0,0,0"

ModisDownload(x='MOD11A2',h=c(24,25),v=c(5,6),version='006',dates=c('2011.01.01','2011.03.31'),mosaic=F,bands_subset = bands, proj=F)

When I run the code, I get this error message:

Error in .._MD_curlHandle <<- RCurl::getCurlHandle() : cannot change value of locked binding for '.._MD_curlHandle'

I'm not sure what this error message means.

  • 1
    What version of R and rts? – Spacedman Oct 30 '17 at 7:48
  • I'm using RStudio 3.4.2 and rts 1.0 -38. – user85586 Oct 31 '17 at 5:59
  • 1
    I can't run this as is because it needs a user/pass, but reading the docs seems to say the "bands" should be space-separated instead of comma-separated. Might not make any difference... – Spacedman Oct 31 '17 at 8:04
1

Try to use the latest version of the rts package that is currently on GitHub. This is fixed there. Following is the way to install it:

devtools::install_github('babaknaimi/rts')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.