Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Jzol : Thanks for the code and details. I tried this code but the problem is in "*NDVI". I get the output as "20060501_NDVI.HDF":*NDVI' does not exist in the file system. I am assuming that " * " will act as a wildcard for selecting any NDVI dataset in the hdf. Also the details in the gdalinfo command does not give information about Co-ordinate reference system and hence "-tr 250 250 -r nearest" command does not work as it may not be georeferenced in meter.
I deleted ModisDownload.R and ModisLP.RData in my working directory and downloaded it again from r-gis.net/?q=ModisDownload. This time it worked. Thanks for response.
Thanks for the unsupervised classification code in R script. But I am specifically looking to use the supervised classification algorithms written in SAGA through script.
NDVIFILES=$(g.mlist -p type=rast pattern=*NDVI mapset=shenkottah); QAFILES=$(g.mlist -p type=rast pattern=Qu* mapset=shenkottah); So when I use the command echo $NDVIFILES, I get the following o/p: rast files available in mapset <shenkottah>: A2013001h25v08NDVI A2013097h25v08NDVI A2013193h25v08NDVI A2013289h25v08NDVI A2013017h25v08NDVI A2013113h25v08NDVI A2013209h25v08NDVI A2013305h25v08NDVI; Similarly I get o/p for echo $QAFILES; sed -n "3p" $NDVIFILES is not working. Please let me know if I need to clear anything. Thanks