<br><font size=2 face="sans-serif">Thanks, Frank. It works now. But the
cellsize of the image was changed a little bit (e.g. cellsize of the original
image is 14.25, the cellsize is changed to 14.33 after gdalwarp).
Do you have any idea what the problem is?</font>
<br>
<br><font size=2 face="sans-serif">Thanks</font>
<br>
<br><font size=2 face="sans-serif">Huajun </font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Frank Warmerdam <warmerdam@pobox.com></b>
</font>
<p><font size=1 face="sans-serif">03/21/2007 03:57 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Huajun Zhang <huajun_zhang@usgs.gov></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">gdal-dev@lists.maptools.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: gdalwarp error</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Huajun Zhang wrote:<br>
> <br>
> Thank you very much, Frank. I met another problem when I use gdalwarp:<br>
> <br>
> gdalwarp -t_srs '+proj=aea +lat_1=29.50 +lat_2=45.50 +lat_0=23.00
<br>
> +lon_0=-96.00 +x_0=0.000 +y_0=0.000 +ellps=GRS80 +units=m +datum=NAD83'
<br>
> abl.sid abl.img<br>
> <br>
> I got the error message:<br>
> <br>
> ERROR 1: Translating source or target SRS failed: '+proj=aea<br>
> <br>
> I tried to use C API, I followed the gdalwarp API tutorial, the <br>
> reprojection does not get the correct result either:<br>
> <br>
> OGRSpatialReference oSRS;<br>
> <br>
> oSRS.SetProjCS( "Albers Conical Equal Area" );<br>
> oSRS.SetACEA( 29.5, 45.5, 23.0, -96.0, 0.0, 0.0);<br>
> oSRS.SetWellKnownGeogCS( "NAD83" );<br>
> oSRS.exportToWkt( &pszDstWKT );<br>
> <br>
> Do you have any idea?<br>
<br>
Huajun,<br>
<br>
The error message looks like the issue has to do with quoting. Are
you by<br>
any chance on windows? If so, you will need to use double quotes
to hold<br>
an argument to -t_srs together.<br>
<br>
I'm not clear in what way the C API code failed for you.<br>
<br>
Best regards,<br>
-- <br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com<br>
light and sound - activate the windows | http://pobox.com/~warmerdam<br>
and watch the world go round - Rush | President OSGeo, http://osgeo.org<br>
</tt></font>
<br>