ArcPy: Convolution Filtering
ArcGIS is a powerful tool that supports various industries and sectors. However ArcGIS might not have built-in tools for every problem or an easy workflow to solve a problem. These missing built-in functions range from lacking a concave hull generator (to compute a concave hull from a series of points provided as a feature class) to certain advanced geoprocessing tools previously available by using VBA (Visual Basic).
So how can users overcome inefficiencies or create tools for their specific needs? The answer is scripting using ArcPy, a Python site package for ArcGIS. ArcPy can be used within ArcMap’s Field Calculator or can be used to build scripts or tools to perform functions or automate mapping.
In the Fall semester of 2017, I took GEOG 567 at the University of Calgary that taught the introduction to programming within GIS. For the term project, I created a tool within an ArcGIS Toolbox to perform convolution filtering. The tool can be transferred to other users to install into ArcMap on their desktop. The inspiration behind creating this tool is that image processing or filtering is essential to helping analyze an image, whether it be a satellite image or even within medical imaging (ex, MRI or CT scanning).
Image processing or filtering is not easily doable within ArcGIS. The tool created provides a method of filtering a single band of a raster dataset through a preset or custom filter. The tool uses convolution with zero padding to process the filtering. For present filters, there is a choice between a Smoothing/Gaussian Blur (3×3 or 5×5 matrix), Sharpen (3×3) and more. For a custom filter, there is the option for the user to enter in the numbers that make up the kernel/mask. After filtering, the tool outputs the filtered raster as a tiff or img file to the location the user specifies. Images below show the image without a filter and then with a Gaussian Blur (5×5).