This tool should take one raster as input and one as an output. Perform at least two arcpy tools on the raster. These can be the same ones we have done in class (slope, aspect) or others. You can assume that the raster is an "img" file format and is relatively small.
Make sure you test the tool and a few different raster files.
Warning: Always use small rasters to debug your tools and scripts and then test on larger rasters. I regularly see students unable to finish scripts because of the time and problems associated with processing large rasters.
We use attributes for a wide variety of analysis tasks. Using Python, you can access attributes, compute statistics from them, and combine them with other information in new an exciting ways.
You can use the shapefile for Oregon dams (available at: Oregon Dams Geodatabase) or another shapefile that contains an attribute column with a range of numeric values. Your script should work with any shapefile that contains a column of numeric values (integers or floating-point).
Create a tool for ArcGIS that allows the user to select a Shapefile, a field (attribute) within the shapefile, and computes the: number of values, total of all values, and the mean value. The tool should then display a dialog box with the result.
It's up to you how you structure the script with functions and modules. Make sure you try the script with a few shapefiles to make sure it works. Think about potential problems that you may want to provide error checking for.
Your tool will need to:
Note: Remember to place the overall script in a "try/except" block and fully document all files
© Copyright 2018 HSU - All rights reserved.