0

rasterFromXYZ(dataframe, crs = crs)

class      : RasterLayer 
dimensions : 2160, 4320, 9331200  (nrow, ncol, ncell)
resolution : 0.08333333, 0.08333333  (x, y)
extent     : -180, 180, -89.99999, 90  (xmin, xmax, ymin, ymax)
crs        : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 

Why isn't the extent for ymin = -90? Is there a way to test why this is the case?

prayner
  • 393
  • 1
  • 10
  • If that does not answer your question, then you should provide a [minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). It should be [minimal, but complete and verifiable example](https://stackoverflow.com/help/minimal-reproducible-example). Your question should be clear and specific. – M-- Apr 07 '20 at 23:14
  • This is a different case, and a fair question, even if poorly asked – Robert Hijmans Apr 08 '20 at 01:36
  • The reason is that the resolution and extent are estimated from the points. A small inaccuracies (see the link by M--) easily creep in. Here I would do `x <- rasterFromXYZ(df); extent(x) <- extent(-180,180,-90,90)` – Robert Hijmans Apr 08 '20 at 01:37

0 Answers0