Hi all,

I've been trying to use mollweide projection on a raster of the world and
something is going weird.
The problem (which can be seen in the plot) is that there are cells out of
the map bounds (extent?).
Probably due to the warning I get on the projectRaster() function:

In rgdal:::.gd_transform(projto_int, projfrom, nrow(xy), xy[, 1],  :
  3730 projected point(s) not finite

I used the following code:

library(raster)
library(mapproj)
library(maptools)
library(rgdal)
data(wrld_simpl)

r<-raster(nrows=180, ncols=360, xmn=-180, xmx=180, ymn=-90, ymx=90)
r[]<-1:ncell(r)

r[]<-0

grid<-rasterize(x=wrld_simpl, y=r)
grid[grid>=1]<-1
grid[grid==0]<-NA

moll_crs<-"+proj=moll +ellps=WGS84"
grid_moll<-projectRaster(grid, crs=moll_crs)
plot(grid_moll)
plot(wrld_simpl_Mollweide, add=T)

Is there any mistake??

Thanks in advance
Daniel

	[[alternative HTML version deleted]]

