<br><font size=2 face="sans-serif">Thank you very much, Frank. I met another
problem when I use gdalwarp:</font>
<br>
<br><font size=2 face="sans-serif">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</font>
<br>
<br><font size=2 face="sans-serif">I got the error message:</font>
<br>
<br><font size=2 face="sans-serif">ERROR 1: Translating source or target
SRS failed: '+proj=aea</font>
<br>
<br><font size=2 face="sans-serif">I tried to use C API, I followed the
gdalwarp API tutorial, the reprojection does not get the correct result
either:</font>
<br>
<br><font size=2 face="Courier New">&nbsp;OGRSpatialReference oSRS;</font>
<br>
<br><font size=2 face="Courier New">&nbsp;oSRS.SetProjCS( &quot;Albers
Conical Equal Area&quot; );</font>
<br><font size=2 face="Courier New">&nbsp;oSRS.SetACEA( 29.5, 45.5, 23.0,
-96.0, 0.0, 0.0);</font>
<br><font size=2 face="Courier New">&nbsp;oSRS.SetWellKnownGeogCS( &quot;NAD83&quot;
);</font>
<br><font size=2 face="Courier New">&nbsp;oSRS.exportToWkt( &amp;pszDstWKT
);</font>
<br>
<br><font size=2 face="sans-serif">Do you have any idea?</font>
<br>
<br><font size=2 face="sans-serif">Thanks</font>
<br>
<br><font size=2 face="sans-serif">Huajun Zhang</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Frank Warmerdam &lt;warmerdam@pobox.com&gt;</b>
</font>
<p><font size=1 face="sans-serif">03/20/2007 01:40 AM</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 &lt;huajun_zhang@usgs.gov&gt;</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: [Gdal-dev] Assign projection to
a tif image</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Huajun Zhang wrote:<br>
&gt; <br>
&gt; Hi,<br>
&gt; <br>
&gt; Is there any method to define a projection to a image rather than
<br>
&gt; reproject the image with gdalwarp?<br>
<br>
Huajun Zhang,<br>
<br>
A projection can be attached to an image in the process of translating<br>
it if the existing projection is wrong or if the input image lacks one<br>
entirely.<br>
<br>
For instance,<br>
<br>
gdal_translate -a_srs '+proj=utm +zone=11 +datum=WGS84' in.tif out.tif<br>
<br>
Is this the sort of operation you had in mind?<br>
<br>
Best regards,<br>
-- <br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up &nbsp; | Frank Warmerdam, warmerdam@pobox.com<br>
light and sound - activate the windows | http://pobox.com/~warmerdam<br>
and watch the world go round - Rush &nbsp; &nbsp;| President OSGeo, http://osgeo.org<br>
</tt></font>
<br>