Dear Amit,
if you set pixelSize asIn, the handling of the pixelsize is done by gdal_translate, runGdal in such case does not provide any information about resolution to used 'gdal_translate'.
As your outProj is 4326 you have geographic coordinates, this means that in planar coordinates your grid is not the equal sized within your extent. I don't know how gdal decides about the resolution if no information has provided, and where it fixes the resolution (from source to target file), with where I mean if it is on a corner, in the middle or some mean of all...
To be precise (or little more precise), the MODIS 250 m resolution is 231,xx m and if you want to have more influence about the pixelsize (and you have no other option than using geographic coordinates), you could convert on the location you focus on the target pixelsize to degrees, having at least in a restricted area the resolution you wish. But I suggest you to stay in Sinusoidal projection and decide on it on a later point if needed:
runGdal( job="H12V12", product="MOD13Q1", tileH=12, tileV=12,
begin="2000049", end="2000049", SDSstring="111000000010",
outProj="asIn" ,pixelSize="asIn" )
this does not reproject at all, it simply extracts the hdf SDS to single layer tifs. This because your extent is defined with tileH and tileV and you outProj and pixelSize are asIn.
Or if you have a target raster where you work with in your current project you could also do:
r <- raster('yourrasterfile')
runGdal( job="H12V12", product="MOD13Q1", extent=r,
begin="2000049", end="2000049", SDSstring="111000000010" )
in this case the MODIS data will fit in any sense the r object (resolution, extent and projection)
I hope this helps,
Matteo
Amit Boshale <amit.boshale at yahoo.com> 11/19/14 2:42 PM >>>
Dear MailLister,
I have a problem with runGdal function in MODIS package. At Nadir the resolution should be 250 m. The output of the following code result are NDVI, EVI, composite day of the year and VI quality Tifs (resolution of 150 m)