Something like the following perhaps?

gdal_translate -projwin 0 90 180 -90 g0-360.tif g0-180.tif
gdal_translate -projwin 180 90 360 -90 -a_ullr -180 90 0 -90 g0-360.tif
g-180-0.tif
gdal_merge[.py] -o g-180-180.tif g0-180.tif  g-180-0.tif

Regards
Luke
________________________________

From: [email protected]
[mailto:[email protected]] On Behalf Of Jose Gomez-Dans
Sent: Thursday, 21 January 2010 5:20 AM
To: gdal-dev
Subject: [gdal-dev] Convert raster from [0,360] to [-180,180]


Hi,
I have some raster files spanning the globe from 0 to 360 degrees
longitude. However, I would rather they be in the -180 to 180 degree
range. While I can do this converting into VRTs and playing around with
the SimpleSource element, I also saw a posting on this list that
suggests that one can easily use gdalwarp for this
<http://lists.osgeo.org/pipermail/gdal-dev/2006-June/009293.html>. The
suggested command is

gdalwarp --config CENTER_LONG 180 openev/utm.tif ll.tif -t_srs WGS84

I have tried this command on my file (which is initially in WGS84 0 to
360), set the value of CENTER_LONG to 0, but I basically get my old
raster back, with the longitudes going from 0 to 360.

Anything other than scripting/VRT editing?

Thanks!
Jose



------
If you have received this transmission in error please notify us immediately by 
return e-mail and delete all copies. If this e-mail or any attachments have 
been sent to you in error, that error does not constitute waiver of any 
confidentiality, privilege or copyright in respect of information in the e-mail 
or attachments. 



Please consider the environment before printing this email.

------

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to