[Gdal-dev] How to Use gdalwarp to Convert to Simple Lon/Lat?

Kent Eschenberg eschenbe at psc.edu
Thu Jul 19 16:36:48 EDT 2007


What are the options for gdalwarp that will produce an image on a simple 
longitude/latitude coordinate system?

The input file, lambert.tif, is a GeoTiff file from the National Atlas using 
the Lambert_Azimuthal_Equal_Area projection. It covers the 48 states.

I'd like the output X pixel coordinate to represent equally-spaced values of 
longitude and Y to represent latitude.

I tried this:

    gdalwarp -t_srs "+proj=ortho +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0"
       lambert.tif ortho.tif

I took the values for "+lat", "+lon", "+x_0" and "+y_0" from the input. 
gdalwarp wouldn't work without them.

This is a huge map so I've looked at only a 4000x3000 piece from the upper-left 
corner. ortho.tif looked the same as lambert.tif. The U.S.-Canadian border was 
curved in both. That doesn't seem right.

"gdalwarp --version" yields "GDAL 1.4.2.0, released 2007/06/27". I'm using a 
Redhat Fedora Core 5 system.

TIA!
Kent



More information about the Gdal-dev mailing list