21. Geoprocessing with WhiteboxTools# 21.1. Introduction# 21.2. Learning Objectives# 21.3. Why Whitebox?# 21.3.1. What is Whitebox?# 21.3.2. What can Whitebox do?# 21.3.3. How is Whitebox different?# 21.4. Useful Resources for Whitebox# 21.5. Installing Whitebox# 21.6. Watershed Analysis# 21.6.1. Create Interactive Maps# 21.6.2. Download Watershed Data# 21.6.3. Download and Display DEM# 21.6.4. Get DEM metadata# 21.6.5. Add colorbar# 21.6.6. Initialize WhiteboxTools# 21.6.7. Initialize WhiteboxTools# 21.6.8. Set working directory# 21.6.9. Smooth DEM# 21.6.10. Create hillshade# 21.6.11. Find no-flow cells# 21.6.12. Fill depressions# 21.6.13. Delineate flow direction# 21.6.14. Calculate flow accumulation# 21.6.15. Extract streams# 21.6.16. Calculate distance to outlet# 21.6.17. Vectorize streams# 21.6.18. Delineate the longest flow path# 21.6.19. Generate a pour point# 21.6.20. Snap pour point to stream# 21.6.21. Delineate watershed# 21.6.22. Convert watershed raster to vector# 21.7. LiDAR Data Analysis# 21.7.1. Set up whitebox# 21.7.2. Download a sample dataset# 21.7.3. Read LAS/LAZ data# 21.7.4. Upgrade file version# 21.7.5. Write LAS data# 21.7.6. Histogram analysis# 21.7.7. Visualize LiDAR data# 21.7.8. Remove outliers# 21.7.9. Visualize LiDAR data after removing outliers# 21.7.10. Create DSM# 21.7.11. Visualize DSM# 21.7.12. Create DEM# 21.7.13. Visualize DEM# 21.7.14. Create CHM# 21.8. Key Takeaways# 21.9. Exercises# 21.9.1. Exercise 1: Watershed Analysis for a Different Location# 21.9.2. Exercise 2: LiDAR Analysis for Forest Structure Assessment#