<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"><blockquote>-------- Message original --------<br></blockquote>Sujet: [Gdal-dev] Use of gdalwarp/translate utility
<br>Date: Fri, 18 May 2007 11:51:21 -0400<br>De: Doug Nebert &lt;<a href="mailto:ddnebert@usgs.gov">ddnebert@usgs.gov</a>&gt;<br>Répondre à: <a href="mailto:ddnebert@usgs.gov">ddnebert@usgs.gov</a><br>Pour: <a href="mailto:gdal-dev@lists.maptools.org">
gdal-dev@lists.maptools.org</a><br><br>I have a series of images that are 2000x2000 pixels centered on the<br>polar regions in a EPSG:3413 projection, though Proj.4/GDAL don&#39;t seem<br>to know about it yet. I&#39;d like to take the GIFs and embed the
<br>projection information in the TIFF header so that they may be<br>used/interpreted in applications such as transformation to other<br>projections.<br></blockquote>...<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<blockquote>gdal_translate -a_srs &quot;+proj=stere +datum=wgs84 +lat_ts=70.0 +lat_0=90<br></blockquote>+lon_0=-45&quot; -of GTiff input1.gif quickscat1.tif</blockquote><div><br>... <br></div><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
gdalinfo says:<br><br>Driver: GTiff/GeoTIFF<br>Size is 1530, 1530<br>Coordinate System is:<br>PROJCS[&quot;unnamed&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp; GEOGCS[&quot;WGS 84&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DATUM[&quot;WGS_1984&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPHEROID[&quot;WGS 84&quot;,6378137,
298.2572235630016,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PRIMEM[&quot;Greenwich&quot;,0],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UNIT[&quot;degree&quot;,
0.0174532925199433],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]],<br>&nbsp;&nbsp;&nbsp;&nbsp; PROJECTION[&quot;Polar_Stereographic&quot;],<br>&nbsp;&nbsp;&nbsp;&nbsp; PARAMETER[&quot;latitude_of_origin&quot;,70],<br>&nbsp;&nbsp;&nbsp;&nbsp; PARAMETER[&quot;central_meridian&quot;,-45],
<br>&nbsp;&nbsp;&nbsp;&nbsp; PARAMETER[&quot;scale_factor&quot;,1],<br>&nbsp;&nbsp;&nbsp;&nbsp; PARAMETER[&quot;false_easting&quot;,0],<br>&nbsp;&nbsp;&nbsp;&nbsp; PARAMETER[&quot;false_northing&quot;,0],<br>&nbsp;&nbsp;&nbsp;&nbsp; UNIT[&quot;metre&quot;,1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]]]
<br>Metadata:<br>&nbsp;&nbsp; AREA_OR_POINT=Area<br>Corner Coordinates:<br>Upper Left&nbsp;&nbsp;(&nbsp;&nbsp;&nbsp;&nbsp;0.0,&nbsp;&nbsp;&nbsp;&nbsp;0.0)<br>Lower Left&nbsp;&nbsp;(&nbsp;&nbsp;&nbsp;&nbsp;0.0, 1530.0)<br>Upper Right ( 1530.0,&nbsp;&nbsp;&nbsp;&nbsp;0.0)<br>Lower Right ( 1530.0, 1530.0)<br>Center&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;&nbsp;765.0,&nbsp;&nbsp;765.0
)</blockquote><div><br>It seems you should add the -a_ullr option (see <a href="http://www.gdal.org/gdal_translate.html">http://www.gdal.org/gdal_translate.html</a>) to add coordinates and pixel size to your raster.<br>Using -a_srs alone you only add information about coordinate system without modifying the coordinates themselves (
i.e. upper-left coordinates, pixel size and so on).<br>So if your GIF doesn&#39;t provide these informations to gdal you should add them by hand.<br><br>Good luck,<br>Guillaume.</div>