I want to project a global image (source ERA INTERIM) from WGS 84 to sinusoidal, using gdal 1.11 and bilinear resampling. It work fine BUT I have values everywhere on the rectangular extent of the projected dataset when I use the -te option. That is, the values are repeated when the dateline is crossed (e.g values from 179 East are duplicated on the left of values from 180 West).
Is there a trick to make sure that the values are not duplicated on the output image (NoData to the left of the projected 180W and to the right of the projected 180E) ?
The workaround is to create a mask of the globe for NoData, but mabe there is a gdalwarp option for doing this in one step.
EDIT : there was a little extra of 1/2 pixel on the original data set, but I've tried with a vrt of just less the 180 and the problem persisted. It does not solve the problem.
the problem occurs with :
gdalwarp -r bilinear -co COMPRESS=LZW -co TILED=YES -tr 463.312716527777752 463.312716527777752 -te -20015109.353999998420477 -10007554.677 20015109.354 10007554.676999999210238 -multi -t_srs "+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs" $input $output
but not with
gdalwarp -r bilinear -co COMPRESS=LZW -co TILED=YES -tr 463.312716527777752 463.312716527777752 -multi -t_srs "+proj=sinu" $input $output
however, I need to use the -te option in order to force all my output images with exactly the same extent.