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

ValiSystem vali.system at free.fr
Fri Jul 20 05:18:03 EDT 2007


On 19 juil. 07, at 22:36, Kent Eschenberg wrote:

> 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
>


You can use ESPG:4326 which is the lat/long projection on the WGS84  
datum. This should be exactly what you expect.

gdalwarp -t_srs EPSG:4326 lambert.tif ortho.tif






More information about the Gdal-dev mailing list