[Gdal-dev] problem with gdalwarp

Frank Warmerdam warmerdam at pobox.com
Wed Aug 23 15:28:50 EDT 2006


Naiara Pinto wrote:
> Hello,
> 
> I am using gdal 1.2.6-1.3 and I am having a problem with gdalwarp. I
> am trying to project a Modis layer from lat long to Lambert Azymuthal
> Equal Area. Here is what I tried:
> 
> gdalwarp -s_srs '+proj=longlat +datum=WGS84 +ellps=sphere +no_defs'
> -t_srs '+proj=laea +lat_0=45 +lon_0=-100 +ellps=sphere +x_0=0 +y_0=0
> +units=m +no_defs' -rn -te -115 29 -101 42 -srcnodata 251 -dstnodata
> -9999 LatLon.NA.2001.tree.tif perc_tree.tif
> 
> But I am getting the error message:
> ERROR 1: geocentric transformation missing z or ellps
> ERROR 1: GDALSuggestedWarpOutput() failed because the passed
> transformer failed.
> 
> Does anyone have any ideas why this is hapenning?

Naiara,

That's a pretty old version, so it's hard for me to know what might be
causing the problem exactly.  In particular, this problem is actually
down in PROJ.4, though it might relate to the arguments passed by GDAL.

Note '+datum=WGS84 +ellps=sphere' isn't really meaningful.  They conflict.

I'd suggest trying:

  gdalwarp -s_srs '+proj=longlat +datum=WGS84'
    -t_srs '+proj=laea +lat_0=45 +lon_0=-100 +datum=WGS84 +x_0=0 +y_0=0
    +units=m +no_defs' -rn -te -115 29 -101 42 -srcnodata 251 -dstnodata
    -9999 LatLon.NA.2001.tree.tif perc_tree.tif

In this example you are telling gdalwarp that everything is WGS84, so
it should avoid any attempts at datum shifts.  Alternatively, you might
replace +datum=WGS84 with +ellps=sphere.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list