In the previous lesson, you classified land cover to show Lake Poyang in three different years: 1984, 2001, and 2014. In this lesson, you'll clean up your classified images with generalization analysis tools to remove small errors or minor water bodies around the lake. You'll also smooth the lake's boundaries. After preparing your images, you'll calculate the area of the lake over the past 30 years and determine how much it has changed.
Filter individual pixels
First, you'll clean up the small, individual pixels that are not part of Lake Poyang. Some of these pixels belong to tiny ponds or water bodies, while others were classified incorrectly. Either way, they should not be counted when calculating Lake Poyang's area, so you'll run a geoprocessing tool to eliminate as many of them as possible.
- If necessary, open your Poyang Land Cover project in ArcGIS Pro.
- Click the Analysis tab and click Tools to open the Geoprocessing pane.
If the Geoprocessing pane is already open to a specific tool, click the Back button in the upper left of the pane to return to the search box.
- In the search box, type Majority Filter. Click the Majority Filter tool.
The Majority Filter tool is a data generalization tool. It replaces cells in an image or raster layer based on the value of the majority of the neighboring cells. If a cell has a value of 1 but three of its four neighboring cells have a value of 2, the tool will change the 1 value to fit the surrounding values. You'll run the tool three times, once for each classified image.
- For Input raster, choose Iso_1984.
- Change the Output raster name to Filter_1984.
The other parameters let you choose how many neighboring cells the tool will use and whether a majority of contiguous cells must be the same value or if only half must be. In order to generalize the maximum amount of individual pixels and create a greater smoothing effect, you'll use half.
- For Replacement threshold, choose Half.
- Click Run.
The generalization removed many of the individual pixels, but many still remain. Additional generalization might be warranted, but generalization also runs the risk of removing data that you do want (in this case, it risks generalizing the values that represent Lake Poyang). You'll fix some of the remaining issues when you smooth out the boundaries later, but for now, you'll run the tool on the other image layers.
- In the Geoprocessing pane, change the Input raster to Iso_2001 and the Output raster name to Filter_2001.
- Click Run.
The generalized 2001 image is added to the map.
- Run the Majority Filter tool on the Iso_2014 raster. Name the output raster Filter_2014.
The generalized 2014 image is added to the map. Now that you have generalized versions of the three classified images, you no longer need the original classified images on the map.
- In the Contents pane, right-click the Iso_2014 layer and choose Remove.
- Remove the Iso_2001 and Iso_1984 layers.
If you need to access these layers again, you can find them (as well as all the other layers you create in this project) in the poyang database in the Catalog pane.
Clean image boundaries
You've removed some of the individual pixels in each image. Next, you'll clean the boundaries between values in each image to remove the pixelated, granular edges.
- In the Geoprocessing pane, click the Back button to return to the search box.
- Search for and open the Boundary Clean tool.
The Boundary Clean tool smooths boundaries between classes (also known as zones) by expanding the boundaries and then shrinking them back to their original size. Doing so generally removes individual pixels and replaces them with the value of the pixels around them. Its results achieve a similar effect as the Majority Filter tool, but it uses a different process to achieve that effect.
- For Input raster, choose Filter_1984.
- Change the Output raster name to Clean_1984.
The Sorting technique parameter determines whether values with larger or smaller areas are prioritized during expansion, and the check box determines the number of times the process is run. You'll run the process twice to maximize generalization, and you won't give priority to either area size.
- Click Run.
The differences are small, but the boundaries between values are smoothed out. Additionally, more of the small, individual pixels scattered throughout the image are removed. While a few remain, the generalization tools have cleaned up the image substantially. If you want to see the differences for yourself, try using the Swipe tool and zooming in close to the image to compare. Next, you'll run the Boundary Clean tool on the other images.
- Run the Boundary Clean tool on the Filter_2001 raster. Change the Output raster name to Clean_2001.
The new 2001 image is added to the map.
- Run the Boundary Clean tool on the Filter_2014 raster. Change the Output raster name to Clean_2014.
The new 2014 image is added to the map. You no longer need the images created by the Majority Filter tool, so you'll remove them.
- In the Contents pane, remove the Filter_2014, Filter_2001, and Filter_1984 layers.
If you want to visually compare the extent of Lake Poyang again, change the symbol for Values 2, 3, and 4 in all three layers to No color.
Determine change in area
You've cleaned up your original classified image to remove a lot of the small errors or stray pixel groupings. Next, you'll calculate the area of Lake Poyang. When you originally classified the images into four distinct values, the number of pixels with each value was automatically added to the attribute tables of the layers. Using these pixel counts, you'll determine the hectares of the lake in each image, starting with 1984.
- In the Contents pane, right-click the Clean_1984 layer and choose Attribute Table.
The table opens. Each of the layer's four values has a pixel count. Value 1, which corresponds with water, has approximately 3 million pixels. That's a lot of pixels, but how big is a pixel in real-world terms? You'll find out by checking the image's resolution, which measures how many real-world units correspond to a single pixel.
- Keep the attribute table open. In the Contents pane, right-click the Clean_1984 layer and choose Properties.
The Layer Properties window opens.
- On the left side of the Layer Properties window, click Source.
Source contains information about the layer's data type and location on your computer, the extent of the data, and how the data is being projected on the map.
- Click Raster Information.
Cell Size X and Cell Size Y refer to the length (X) and height (Y) of each cell or pixel. In this case, each pixel on the map corresponds to a real-world area of 30 units by 30 units. However, you still don't know the unit of measurement. Is it 30 inches? 30 kilometers? You want to calculate hectares, so knowing the unit of measurement is important.
- Click Raster Information again to close it. Click Spatial Reference.
Linear Unit refers to the unit of measurement that all spatial calculations involving the layer use by default. In this instance, the unit is meter, which means that each pixel represents a 30-meter by 30-meter (or 900-square-meter) area in the real world.
- Close the Layer Properties window.
To find the area of each value in the image, you'll multiply the pixel count by 900 to convert it to square meters. Then, you'll divide the result by 10,000, which is the number of square meters in a hectare. The overall formula is as follows:
Hectares = (Count × 900) / 10,000
- In the Attribute Table, click the Add Field button.
The Fields View opens, allowing you to manage the fields in the attribute table. A new field is added to the end of the list.
- For the new field, change the Field Name value to Hectares. Change Data Type to Float.
Float is a data type that allows numbers with decimals.
- On the ribbon, on the Fields tab, click Save.
- Close the Fields View to return to the attribute table.
The table now contains the Hectares field, but it has no values. Next, you'll calculate the hectares for each value using the conversion equation discussed earlier.
- Right-click the heading of the Hectares field and choose Calculate Field.
The Geoprocessing Pane opens to the Calculate Field tool.
- Confirm that the Input Table is Clean_1984 and the Field Name is Hectares.
- Under Hectares =, create the expression (!Count! * 900) / 10000.
You can add the Count field to the expression by double-clicking Count in the Fields box.
- Click Run.
The Hectares field in the attribute table is populated with the area in hectares of each value in the image. Value 1, which shows water, is approximately 270,000 hectares—the area of the lake in 1984.
- Close the attribute table.
- Calculate the hectares of the lake in 2001. (Repeat steps 7 through 14, using the Clean_2001 layer.)
- Calculate the hectares of the lake in 2014.
The area of the lake in 2001 is approximately 250,000 hectares, while the area in 2014 is approximately 200,000 hectares. Between 1984 and 2014, nearly 70,000 hectares of Lake Poyang were lost: close to 2,300 hectares a year. Worse yet, the rate of decrease seems to have gotten higher since 2001. While only approximately 20,000 hectares were lost in the 17 years between 1984 and 2001 (close to 1,200 hectares per year), approximately 50,000 hectares were lost in the 13 years between 2001 and 2014 (close to 3,900 hectares per year).
- Save the project.
In this lesson, you classified Landsat imagery of Lake Poyang for three different time periods to calculate how much the lake's area has changed. Your findings indicate a severe problem: the lake has lost thousands of hectares in just 30 years, and the rate of loss is increasing. It's possible that the increased rate is due to the construction of the Three Gorges Dam in 2008. Also possible is that a prolonged drought has contributed to the increased rate. Your calculations don't reveal the causes of Lake Poyang's reduction, but they do provide factual evidence of a serious problem and provide a starting point for environmental scientists and others to conduct further research.