# Filtering¶

The EnMAP Box comes with a variety of filtering algorithms. You can find them in the processing toolbox under EnMAP-Box ‣ Convolution, Morphology and Filtering. In this section we will demonstrate how to apply them, by showing a spatial filter and a spectral filter.

## Spatial Filter¶

Spatial filters apply a 2D kernel spatially (i.e. y/x dimensions) for each band.

Open the testdataset. In the processing toolbox go to EnMAP-Box ‣ Convolution, Morphology and Filtering ‣ Spatial Median Filter.

• Select enmap_berlin.bsq as Raster
• Use the default settings in the code window
• Specify Output Raster, and click Run

## Spectral Filter¶

In spectral filtering a 1D kernel is applied along the z dimension of the raster (bands). Mind that in some cases you will reduce the overall number of band values as values in the beginning and at the end will be set to nodata (depending on the kernel type and size).

Open the testdataset. In the processing toolbox go to EnMAP-Box ‣ Convolution, Morphology and Filtering ‣ Spectral Convolution Gaussian1DKernel.

• Select enmap_berlin.bsq as Raster
• In the code window, change stddev=1 to stddev=2
• Specify Output Raster, and click Run