File Exchange

image thumbnail

filt2 2D geospatial data filter

version (2.85 MB) by Chad Greene
Easily perform 2D highpass, lowpass, bandpass, or bandstop filters on gridded datasets.


Updated 05 Jan 2017

View License

This function performs a 2D gaussian-weighted moving-window averaging filter on gridded datasets. It's designed to simplify the process of converting resolution to pixels and figuring out what sigma value to use. Click on the light bulb icon to the right on this page to see examples of use.

Cite As

Chad Greene (2020). filt2 2D geospatial data filter (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)


thank you !! Then, I have a problem. We know geospatial data gridded in longitude and latitude, they have different resolution in the two direction, because of the sphere of earth. So, can we change the code for a better use?


Why is the wavelength defined at e-folding scale of power instead of at half-power point?


Why is the cut-off length defined at e-folding scale instead of half-power point?

zhiying cai

Very nice job!


can zu

how to filter the spatial field with 15km*20km(X-direction and Y-direction,respectively) in the example?


many thanks...


Added bandpass and bandstop filters.

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux