Masking an image with our area of interest is a common approach in geospatial field. However, using heavy apps to perform this simple operation is a time consuming process. So, a user can use this python program to mask a georeferenced image with a user selected shapefile.
At first compilation of this program, user is directed to a user interface of this program, with a window, contating four buttons as shown in the figure below:
This user guide helps you to use the buttons on the user interface shown above for producing the masked image of your area of interest.
- Add Image: Press Add Image button to add the georeferenced image file from your local directory.
- Add Shape file: After pressing this button, you are directed to your local directories, where you shall choose the area of intrest(AOI) of your project in ".shp format"
- Mask Image: This button when pressed, masks the input image with AOI and saves the masked image to the user selected directory. Masked Successfully will be labelled to the right of this button after the task is completed.
- Plot Results: Click this button to visualize the user input image, masking shapefile of AOI overlayed on it, and the masked image in two subplot area. Snapshot of the plot is shown below:
Futher a video, showing the working of this program is demonstrated below for better understanding: