1

Understanding that this question has been asked a few times (Reprojecting raster from 0 360 to -180 180 with cutting 180 meridian using gdalwarp seems to be the canonical one), I've found that any variation of these solutions causes the left hemisphere to be written with blank data, such as:

  1. gdalwarp with CENTER_LONG = 0: gdalwarp -s_srs "+proj=longlat +ellps=WGS84" -t_srs WGS84 ~/0_360.tif 180.tif -wo SOURCE_EXTRA=1000 --config CENTER_LONG 0
  2. Generating a VRT and editing the metadata as described here: http://trac.osgeo.org/gdal/wiki/UserDocs/RasterProcTutorial
  3. gdalwarp with +lon_wrap=180: gdalwarp -s_srs '+proj=longlat +datum=WGS84 +lon_wrap=180' -t_srs '+proj=longlat +datum=WGS84'

E.g. This: enter image description here

Becomes: enter image description here

This is correctly reprojected, but obviously not what I want as it's missing half the data that was in the original raster. They are raster bands extracted from GRIB2 files. This appears to be something to do with how gdalwarp operates.

What could be causing the left hemisphere to be blank when passed through gdalwarp, and how can I fix it?

  • 3
    Please add how you've created the images. Also include your question in the actual text please, not just in the title. – Bert Coerver Sep 12 '22 at 08:34
  • Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short [tour] for more about how the site works – Ian Turton Sep 12 '22 at 13:20

0 Answers0