I have read the gdal documentation for gdal_rasterize. As well as reading the original forum that established -tap (target aligned pixels). I understand -tap is used to make a standard grid (maybe like ArcGIS snap raster) but I do not understand the usage.

When I use gdal_rasterize and I enter -tap what is -tap aactually doing to the ouput raster?

I do not seem to be able to point -tap to another raster to use this grid and I do not seem to be able to enter origin coordinates. Gdal_rasterize appears to want me to enter only -tap with no following argument. My assumption is it aligns with 0,0 but this is a guess.


-tap just aligns the grid to the resolution. So, if the resolution is 2m, the cells are aligned to round multiples of 2.

  • Thanks, I was looking for something like a snap raster setting in gdal_rasterize. – If you do not know- just GIS Oct 6 '15 at 13:08
  • 1
    I don't think -tap would work because, for example, you couldn't snap the grid to a fraction if the resolution was an integer. You can use the -te flag to explicitly set the extent, along with -tr to set the resolution. You can get the snap extent from the snap raster using gdalinfo. A pain, I know. In GRASS, you can just set the region by the snap raster, but GDAL isn't meant to be a full GIS. – Rob Skelly Oct 6 '15 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.