[Gdal-dev] Re: gdalwarp error

Frank Warmerdam warmerdam at pobox.com
Wed Mar 21 15:57:16 EDT 2007


Huajun Zhang wrote:
> 
> Thank you very much, Frank. I met another problem when I use gdalwarp:
> 
> gdalwarp -t_srs '+proj=aea +lat_1=29.50 +lat_2=45.50 +lat_0=23.00 
> +lon_0=-96.00 +x_0=0.000 +y_0=0.000 +ellps=GRS80 +units=m +datum=NAD83' 
> abl.sid abl.img
> 
> I got the error message:
> 
> ERROR 1: Translating source or target SRS failed: '+proj=aea
> 
> I tried to use C API, I followed the gdalwarp API tutorial, the 
> reprojection does not get the correct result either:
> 
>  OGRSpatialReference oSRS;
> 
>  oSRS.SetProjCS( "Albers Conical Equal Area" );
>  oSRS.SetACEA( 29.5, 45.5, 23.0, -96.0, 0.0, 0.0);
>  oSRS.SetWellKnownGeogCS( "NAD83" );
>  oSRS.exportToWkt( &pszDstWKT );
> 
> Do you have any idea?

Huajun,

The error message looks like the issue has to do with quoting.  Are you by
any chance on windows?  If so, you will need to use double quotes to hold
an argument to -t_srs together.

I'm not clear in what way the C API code failed for you.

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