I have a raster with 500 meter resolution that was in sinusoidal projection, so I first converted it to WGS84using the raster package in R using the following code:

library (raster)
#Load the tif file
tif <- raster("~/Sinu.tif")
# Extract the SRS of the original tif
CRS <- "+proj=sinu +lan_0=0 +x_0=0 +y_0=0 +R=631007.181 +units=m +no_defs"
#Transform the projection to WGS84
llcrs <- "+proj=longlat +ellps=WGS84 +datum=WGS84"
#Create a data frame of the original sinusoidal tif
DF <- as.data.frame(Sinu, xy=TRUE)
#Create the Transform
rll <- projectRaster(Sinu,crs = llcrs)
#ras_sinu <- raster(nrow=391, ncol=695, ext=extent(-9031818, 4773511, -870816, 4954666), crs=incrs)
#rs <- rasterImage(w, ras_sinu)
Sin2WGS84 <- writeRaster(rll,filename = "~/Sinu2WGS84.tif")

The conversion was done to align the pixels of this finer resolution raster with another raster which is in WGS84and has a spatial resolution of 1/16 (approximate to 6 kilometers). The coarser resolution raster has a representative gridded polygon file. I then imported the transformed tif file to ArcGIS and converted it to a Polygon in ArcGIS. This was done to see whether 12x12 (12 rows by 12 columns of pixels) 500M meter pixels fall in a coarser pixel. But as you can see in the following image I am getting either 10x10 or 11x11 pixels. What can I do in R or ArcGIS to solve this alignment problem? If anyone wants to access the data, please click here.

enter image description here

1 Answer 1


"another raster which is in WGS84 and has a spatial resolution of 6 kilometers"

These two things can't both be true. A raster in WGS84 coordinates is defined by a regular grid in lat-long, and you can't have a regular grid in lat-long that is also an exact number of kilometers everywhere because the size of a degree of longitude changes according to the latitude.

Data in lat-long that claims to have a resolution in kilometres is usually referring to an approximate size, or possibly a size at the equator where latitude and longitude have the same size on the ground.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.