[gdal-dev] Matching two rasters
Chaitanya kumar CH
chaitanya.ch at gmail.com
Sat May 14 00:28:57 EDT 2011
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.
On Sat, May 14, 2011 at 1:28 AM, Jonathan Greenberg
<greenberg at ucdavis.edu>wrote:
> 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?
> 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: jgrn307 at hotmail.com, Gchat: jgrn307
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
Chaitanya kumar CH.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev