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)?
2 Answers
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°?
- 635
- 4
- 15
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.
- 63,755
- 5
- 81
- 115
-
I am still getting the same result, and I am using the same version of QGIS and Proj4 as you... – Zoran Petrović Feb 28 '18 at 14:29
-
It might help if you take the sphere version of Miller, EPSG:53003. Apart from that, try to save in that CRS, instead of using on-the-fly reprojection. – AndreJ Feb 28 '18 at 14:53
-
@AndreJ Tried sphere version and saving everything but the same problem persists... – Zoran Petrović Feb 28 '18 at 15:15





https://epsg.io/54003
– Zoran Petrović Feb 28 '18 at 14:13