[gdal-dev] What are the arguments to gdalwarp to cross the date line?

pcreso at pcreso.com pcreso at pcreso.com
Wed Aug 31 15:22:27 EDT 2011


Hi Jim,

proj.4 (cs2cs) has a parameter to force lat long coords into a +-180 or 0-360 space by specifying the output central meridian.

>From the proj.4 changelog:
2006-10-12  Frank Warmerdam  <warmerdam at pobox.com>

    * Added experimental +lon_wrap argument to set a "center point" for 
    longitude wrapping of longitude values coming out of pj_transform().

This defaults to zero, for +-180 but can also be set to 180 for 0-360. I don't know if you can do the same with GDAL.

You also have the option of cropping the dataset to generate two images, one each side of the dateline, and the one in the western hemisphere can be assigned coords in the +-180 or 0-360 space as you see fit to render correctly in your application.

I have done this routinely with MODIS imagery.

Cheers,

  Brent Wood

--- On Thu, 9/1/11, Jim Bellenger <bellengj at gmail.com> wrote:

From: Jim Bellenger <bellengj at gmail.com>
Subject: [gdal-dev] What are the arguments to gdalwarp to cross the date line?
To: gdal-dev at lists.osgeo.org
Date: Thursday, September 1, 2011, 6:55 AM

Hello,
 
I have a Lambert Conformal Conic image that crosses the 180 dateline and I want to gdalwarp to a latlong projection.  The result image wraps around the globe instead of just crossing the dateline.  It seems to be a problem with the western hemisphere because I have tried a "-te" option with both hemispheres and the eastern (positive longitude) hemisphere works fine but not the western hemisphere (negative longitude) always wraps around the globe.  I have tried a +over and +lon_wrap=180 arguments with no success.

 
Jim

-----Inline Attachment Follows-----

_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110831/8eeb14ee/attachment.html


More information about the gdal-dev mailing list