<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 <<a href="mailto:ddnebert@usgs.gov">ddnebert@usgs.gov</a>><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't seem<br>to know about it yet. I'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 "+proj=stere +datum=wgs84 +lat_ts=70.0 +lat_0=90<br></blockquote>+lon_0=-45" -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["unnamed",<br> GEOGCS["WGS 84",<br> DATUM["WGS_1984",<br> SPHEROID["WGS 84",6378137,
298.2572235630016,<br> AUTHORITY["EPSG","7030"]],<br> AUTHORITY["EPSG","6326"]],<br> PRIMEM["Greenwich",0],<br> UNIT["degree",
0.0174532925199433],<br> AUTHORITY["EPSG","4326"]],<br> PROJECTION["Polar_Stereographic"],<br> PARAMETER["latitude_of_origin",70],<br> PARAMETER["central_meridian",-45],
<br> PARAMETER["scale_factor",1],<br> PARAMETER["false_easting",0],<br> PARAMETER["false_northing",0],<br> UNIT["metre",1,<br> AUTHORITY["EPSG","9001"]]]
<br>Metadata:<br> AREA_OR_POINT=Area<br>Corner Coordinates:<br>Upper Left ( 0.0, 0.0)<br>Lower Left ( 0.0, 1530.0)<br>Upper Right ( 1530.0, 0.0)<br>Lower Right ( 1530.0, 1530.0)<br>Center ( 765.0, 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't provide these informations to gdal you should add them by hand.<br><br>Good luck,<br>Guillaume.</div>