1

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)?

wgs84miller

Zoran Petrović
  • 635
  • 4
  • 15
  • Its ESRI 54003, not EPSG. Not sure it has an EPSG code, but can be done with a proj4 string: http://proj4.org/projections/mill.html – Spacedman Feb 28 '18 at 14:05
  • Thank you for your response. Unfortunately, proj +proj=mill +lon_0=0 gives the same result (54003 actually has the same definition)

    https://epsg.io/54003

    – Zoran Petrović Feb 28 '18 at 14:13
  • If others can reproject cleanly to Miller with the same QGIS version, it could be a data-specific issue. What are the extents of the original raster? – mkennedy Feb 28 '18 at 17:35

2 Answers2

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

enter image description here

Someone may experience similar problem with vector data. It can be solved using Antonio Falciano answer: How to render area that crosses 180°?

Zoran Petrović
  • 635
  • 4
  • 15
2

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:

enter image description here

If I switch to "EPSG:54003" (and I don't know why QGIS thinks its an EPSG code....) I get NZ chopped:

enter image description here

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.

Spacedman
  • 63,755
  • 5
  • 81
  • 115