Jonathan, Assuming you want to convert B's projection to A's.
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 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. http://www.gdal.org/gdalinfo.html http://www.gdal.org/gdalwarp.html On Sat, May 14, 2011 at 1:28 AM, Jonathan Greenberg <[email protected]>wrote: > GDALers: > > Say I have two rasters, A and B with different projections, extents, > and resolution. I want to make B match A, such that the projection, > resolution, and extent (filling in with some arbitrary value where > there is no data) all match. Is there a quick way to do this using > command line gdal tools? > > --j > > -- > Jonathan A. Greenberg, PhD > Assistant Project Scientist > Center for Spatial Technologies and Remote Sensing (CSTARS) > Department of Land, Air and Water Resources > University of California, Davis > One Shields Avenue > Davis, CA 95616 > Phone: 415-763-5476 > AIM: jgrn307, MSN: [email protected], Gchat: jgrn307 > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev > -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
