Jonathan,<br><br>Assuming you want to convert B's projection to A's.<br><br>First, run gdalinfo on A.tif and save the part under 'Coordinate System is:' in a file named 'A.prf'. This is the OGC's WKT representation of the Spatial Reference System of A.tif<br>
<br>Then, run gdalwarp on B.tif with the following options. "-t_srs A.prf" to specify the projection system. Specify the target extents using the -te option. You can get the extents from the output of gdalinfo on A.tif. You might also want to set the resolution using the -tr option and the resampling method using the -r option.<br>
<br><a href="http://www.gdal.org/gdalinfo.html">http://www.gdal.org/gdalinfo.html</a><br><a href="http://www.gdal.org/gdalwarp.html">http://www.gdal.org/gdalwarp.html</a><br><br><div class="gmail_quote">On Sat, May 14, 2011 at 1:28 AM, Jonathan Greenberg <span dir="ltr"><<a href="mailto:greenberg@ucdavis.edu">greenberg@ucdavis.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">GDALers:<br>
<br>
Say I have two rasters, A and B with different projections, extents,<br>
and resolution. I want to make B match A, such that the projection,<br>
resolution, and extent (filling in with some arbitrary value where<br>
there is no data) all match. Is there a quick way to do this using<br>
command line gdal tools?<br>
<br>
--j<br>
<br>
--<br>
Jonathan A. Greenberg, PhD<br>
Assistant Project Scientist<br>
Center for Spatial Technologies and Remote Sensing (CSTARS)<br>
Department of Land, Air and Water Resources<br>
University of California, Davis<br>
One Shields Avenue<br>
Davis, CA 95616<br>
Phone: 415-763-5476<br>
AIM: jgrn307, MSN: <a href="mailto:jgrn307@hotmail.com">jgrn307@hotmail.com</a>, Gchat: jgrn307<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>