2

I have a raster downloaded. Visualising it in QGIS.

I want to correctly project it so that its extent varies with longitudes from -180 to 180 instead of 0 to 360.

gdalinfo filename.nc outputs the following as the corner coordinates

Corner Coordinates:
Upper Left  (  -0.1250000,  90.1250000) 
Lower Left  (  -0.1250000, -90.1250000) 
Upper Right (     359.875,      90.125) 
Lower Right (     359.875,     -90.125) 
Center      ( 179.8750000,   0.0000000)

I am looking for a gdal command or python function to perform this task of rotating the image such that longitudes vary from -180 to 180.

Similar questions:

  1. Verifying formula that will convert longitude 0-360 to -180 to 180? (Fortran solution)
  2. https://stackoverflow.com/questions/25730625/how-to-convert-longitude-from-0-360-to-180-180 (R function of rotation)
raaj
  • 285
  • 1
  • 10

1 Answers1

3

Instead of reprojecting the whole data you may try to set the correct projection for your raster. Similar questions:

How to reproject raster from 0 360 to -180 180 with cutting 180 meridian

WKT for EPSG:4326 with LON 0 to +360 instead of -180 to +180

Comrade Che
  • 7,091
  • 27
  • 58