Questions tagged [r-modis]

MODIS is an R package providing functionality to access and process Moderate Resolution Imaging Spectroradiometer (MODIS) satellite images.

37 questions
5
votes
2 answers

'object 'rlang_hash' not found' when using MODISTools functions in R

I am trying to follow the steps on the documentation and use the MODISTools R package to download Land Cover data. I installed MODISTools and imported the library into my R session install.packages("MODISTools") library(MODISTools) Then when I try…
z star
  • 684
  • 6
  • 19
3
votes
1 answer

could not find function "validate_key" using MODISTools in R

I am getting the below error and don't know what is causing it. I am following this vignette to learn MODISTools. https://cran.r-project.org/web/packages/MODISTools/vignettes/modistools-vignette.html library(MODISTools) products <-…
89_Simple
  • 3,393
  • 3
  • 39
  • 94
1
vote
1 answer

MODIStsp in R on MacOS: Error in gdal_utils("buildvrt", gdalfile, output.vrt, opts) : gdal_utils buildvrt: an error occured

My project is on sheep in California and I'm trying to get the vegetation measures of the region over time to see if there's any correlation between disease prevalence and increased vegitation (measured as NDVI). To do this I found a website that…
1
vote
1 answer

How to extract lists of raster into separate raster in R

I have this data in XDR format and I tried to open it using R. This is my data > unlist(MCD12Q1.wgs84.ras.01L) [[1]] class : RasterLayer dimensions : 276, 199, 54924 (nrow, ncol, ncell) resolution : 0.00702, 0.00417 (x, y) extent :…
Yasumin
  • 443
  • 2
  • 8
1
vote
1 answer

Using a shapefile with MODIStsp R package

I'm trying to use the MODIStsp R package to download data for a defined country. For this I downloaded the boundary of Mongolia from here into my working directory and passed it's path into my MODIStsp() function. However, this doesn't seem to…
z star
  • 684
  • 6
  • 19
1
vote
2 answers

Using a shape file to download MODIS product data for country in R

Is there any way that can be used to parse a shapefile of a country and download MODIS product data within that country using R? I tried different approaches using the MODIStsp package (https://docs.ropensci.org/MODIStsp/) as well as the MODISTools…
z star
  • 684
  • 6
  • 19
1
vote
1 answer

Visualising MODIS Vegetation layers for a specific country (using R-package MODISttsp)

I am trying to download and visualise the NDVI data in Kenya (and other countries similarly). For this, I retrieved the bounding box for Kenya using osmdata and used this when downloading NDVI data from…
z star
  • 684
  • 6
  • 19
1
vote
4 answers

In R, how do I reproject from the MODIS sinusoidal projection to latlong (ellps=WGS84) projection

I have managed to extract MODIS land cover data from an HDF file and put it into a raster. library(gdalUtils) #? gdal_translate? library(raster) sds <- get_subdatasets(".......myfileplath/file.hdf") # Isolate the name of the first sds name <-…
1
vote
2 answers

Multiple nested for loops to iterate only under i=j=k indexes in R

I've been trying to calculate the number of pixels of three raster files that satisfy certain condition with R (in Windows 10 and R version 3.6.3). The idea is to use these three images (which are pre-processed) and count the amount of pixels that…
Jorge V
  • 73
  • 7
1
vote
0 answers

Extract points from raster with MODIStsp_extract()

I am trying to use the MODIStsp package to download MODIS data and convert it in a usable format (R table) to do statistical analysis. I downloaded the data, and loaded the virtual raster file in my R session : library(sp) library(MODIStsp) #…
a834311
  • 11
  • 3
1
vote
1 answer

Using HDF data in r

I am trying to download and plot the modis data from here http://orca.science.oregonstate.edu/1080.by.2160.monthly.hdf.vgpm.s.chl.a.sst.php I regularly use .nc files from the ocean colour website but I can't seem to work with the hdf files the same…
liv
  • 93
  • 10
1
vote
0 answers

Error in downloading MODIS image using R script

I am trying to download MODIS images using ModisDownload() function of rts package in R. I used following code. ModisDownload( x = "MOD11A2", h = c(23,24), v = c(5,6), dates = c('2016.01.01','2018.12.31'), MRTpath = 'C:/modis/bin', mosaic =…
usman
  • 21
  • 4
1
vote
1 answer

convert data modis EVI to date yy-mm-dd in r

I work with MODIS EVI rasters in 2000. I have 6 raster by years, one raster by month…
1
vote
0 answers

Subset MODIS L3SMI ncdf based longitude/latitude

I have time series Global MODIS L3SMI dataset in ncdf format, how to subset this dataset on a specific location (i.e. Indonesia regions) based on longitude/latitude range. Then I want to write this dataset into ncdf file same as the original…
Eko Susilo
  • 250
  • 2
  • 15
1
vote
1 answer

IS there a way to get MODIS tiles as a function of lat/long in R?

I'm looking for a way to automatically return the MODIS tile (e.g. h12 v4) as a function of longitude and latitude. I was hoping the MODIS package could do it using getTile(***). I see there's a nice GUI when I use getTile() but I'm looking for an…
Geoff
  • 180
  • 3
  • 11
1
2 3