Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
In QGIS, how to clip a raster with a polygon mask, but keep the outer edge cells of the raster touching the mask?
In other words: how to create a one raster cell outer buffer for the masking polygon?
solved it by creating a buffer first as @Joseph suggested. To get buffer:
ogr2ogr.exe "\"[temporary file]\"" 1402.shp 1402 -dialect sqlite -sql "SELECT ST_Buffer( geometry , 0.001 ),* FROM '1402' "
where, 1402.shp is my mask shapefile and 0.001 is my buffer distance.
Required, but never shown