Download and processing framework for MODIS imagery. The package provides automated access to the global online data archives LP DAAC, LAADS and NSIDC as well as processing capabilities such as file conversion, mosaicking, subsetting and time series.
Maybe I'm mistaken but the getSds function appears to return wrong values when the SDSstring argument is provided. In my case I was querying MOD13Q1.006 HDF files and no matter which SDS I provided as argument it returned "250m 16 days NIR reflectance" in the $SDSnames slot and "0 0 0 0 1 0 0 0 0 0 0 0" in the $SDSstring slot. To my understanding in the function definition of getSds this happens on lines 129 - 132 where msk is assigned TRUE for all elements of SDSstring == 1. If I do not collapse the white spaces from SDSstring (line 121) and replace the for loop (lines 129 - 132) with msk <- sds == SDSstring the function returns the correct values. Hope this helps.
Maybe I'm mistaken but the
getSds
function appears to return wrong values when theSDSstring
argument is provided. In my case I was querying MOD13Q1.006 HDF files and no matter which SDS I provided as argument it returned"250m 16 days NIR reflectance"
in the$SDSnames
slot and"0 0 0 0 1 0 0 0 0 0 0 0"
in the$SDSstring
slot. To my understanding in the function definition ofgetSds
this happens on lines 129 - 132 wheremsk
is assignedTRUE
for all elements ofSDSstring == 1
. If I do not collapse the white spaces fromSDSstring
(line 121) and replace the for loop (lines 129 - 132) withmsk <- sds == SDSstring
the function returns the correct values. Hope this helps.