[gdal-dev] snap window with gdalwarp

Gregory, Matthew matt.gregory at oregonstate.edu
Mon Jul 19 12:28:39 EDT 2010


Hi all,

Is there a way to set a 'snap' coordinate for a target dataset in gdalwarp without having to know the target extent?  For example, if I wanted my target dataset to have extent corners that were a multiple of my cellsize, I could specify (0.0, 0.0) as my snap coordinate.  In Arc, this is accomplished as:

  project grid src target projection.prj bilinear 30 0 0

I'm guessing that with gdalwarp you have to first have to figure out what the projected extent is, buffer that out to your desired snapped extent and then run gdalwarp with that calculated extent and the -te option.  Using VRT as the target data format to figure out this information is simple enough.  I just wanted to make sure that there weren't command line flags I was overlooking.

thanks, matt 



More information about the gdal-dev mailing list