I have a world raster in WGS84, downloaded from Natural Earth. When I set projection to World Miller Cylindrical (EPSG 54003) I lose parts of New Zealand as you can see in the attached pictures. Is there any way to solve this problem in QGIS (version 2.8 or 3)?
I found the solution using gdalwarp. Here is how I solved it:
gdalwarp -s_srs EPSG:4326 -t_srs EPSG:53003 -of GTiff "C:/Users/Zoran/Desktop/input.tif" "C:/Users/Zoran/Desktop/output.tif" -wo SOURCE_EXTRA=1000
The key is using -wo SOURCE_EXTRA=1000
SOURCE_EXTRA: This is a number of extra pixels added around the source window for a given request, and by default it is 1 to take care of rounding error. Setting this larger will increase the amount of data that needs to be read, but can avoid missing source data. http://www.gdal.org/structGDALWarpOptions.html
Someone may experience similar problem with vector data. It can be solved using Antonio Falciano answer: How to render area that crosses 180°?
If I create a custom projection in QGIS with this string
"+proj=mill +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +R_A +datum=WGS84 +units=m +no_defs" I get a nice map with NZ:
If I switch to "EPSG:54003" (and I don't know why QGIS thinks its an EPSG code....) I get NZ chopped:
You can see all of NZ with EPSG:54003 if you zoom in and pan a bit, but there's some weird cropping going on. But set as a custom CRS as I've given, it seems to work fine. This is QGIS 3 with Proj4 version 493.