<span>Hello, comrades.<br><br>I wrote shell script <i.landsat.trim>, that trims the "fringe" from the borders of Landsat images, for each band separately or with the MASK where coverage exists for all bands. Optionally saves vector footprints of trimmed rasters and MASK. Works with Landsat 5, Landsat 7 (SLC-on).<br>
<br>Link: <a href="https://raw.github.com/amuriy/GRASS-scripts/72f039073ff55b006b7aecbaa7870fac193dd9b3/i.landsat.trim" target="_blank">https://raw.github.com/amuriy/GRASS-scripts/72f039073ff55b006b7aecbaa7870fac193dd9b3/i.landsat.trim</a><br>
<br><br>Usage:<br> i.landsat.trim [-maf] [input=string] [input_base=string]<br> [input_prefix=string] output_prefix=string [rast_buffer=value]<br> [gener_thresh=value] [--verbose] [--quiet]<br><br>Flags:<br> -m Trim raster(s) with the MASK where coverage exists for all bands<br>
-a Process all bands<br> -f Save vector footprint(s) of trimmed raster bands or coverage MASK<br> --v Verbose module output<br> --q Quiet module output<br><br>Parameters:<br> input Name of input raster band(s)<br>
Example: L5170028_02820070521_B10<br> input_base Base name of input raster bands<br> Example: L5170028_02820070521<br> input_prefix Prefix name of input raster bands<br> Example: 'B.' for B.1, B.2, ...<br>
output_prefix Prefix for output raster maps<br> Example: 'trim' generates B.1.trim, B.2.trim, ...<br> rast_buffer Distance for raster buffering (in meters)<br> default: 300<br>
gener_thresh Threshold for generalizing of vector footprints or coverage MASK (in meters)<br> default: 3000<br></span><span><span><br><br>Picture with example attached.<br><br></span>--------------------------------------------------------------------<br>
It was made "just for fun", but I hope it would be useful for somebody :)</span><br><br>Best regards,<br>Alexander<br><span>--------------------------------------------------------------------</span><br><span><br>
</span>