title: R: raster() changes pixel size when converting from SpatialGridDF
body: <p>I am using the following MODIS DSR 1km product to do some analysis: <strong>MCD18A1.A2001001.h15v05.061.2020097222704.hdf</strong></p>
  <p>However, I am having trouble converting from SpatialGridDataFrame to Raster, since the pixel size changes...</p>
  <p>Here is my script:</p>
  <pre><code>Filename &lt;- &quot;ModisProductsOriginal/MCD18A1.A2001001.h15v05.061.2020097222704.hdf&quot;
  SDSs &lt;- getSds(Filename)
  GMT_1200_DSR_sgdf &lt;- readGDAL(SDSs$SDS4gdal[8], as.is = TRUE)
  GMT_1200_DSR_rast &lt;- raster(GMT_1200_DSR_sgdf)
  </code></pre>
  <p>Here are the Warnings:</p>
  <p>1: In getProjectionRef(x, OVERRIDE_PROJ_DATUM_WITH_TOWGS84 = OVERRIDE_PROJ_DATUM_WITH_TOWGS84,  :
  Discarded datum Not specified (based on Clarke 1866 spheroid) in Proj4 definition: +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +ellps=clrk66 +units=m +no_defs</p>
  <p>2: In showSRID(uprojargs, format = &quot;PROJ&quot;, multiline = &quot;NO&quot;, prefer_proj = prefer_proj) :
  Discarded datum Unknown based on Clarke 1866 ellipsoid in Proj4 definition</p>
  <p>And here are the results:</p>
  <p><a href="https://i.stack.imgur.com/zognD.png" rel="nofollow noreferrer">GMT_1200_DSR_sgdf</a></p>
  <p><a href="https://i.stack.imgur.com/qvPyc.png" rel="nofollow noreferrer">GMT_1200_DSR_rast</a></p>
  <p>I can't find the solution to this problem and I would like to know if this is supposed to happen, if not how can I solve it? Specifying the CRS? When using sinusoidal projection (&quot;+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs&quot;) only warnings appear, maybe I am not using the CRS correctly.</p>