I am attempting to create in ArcGIS 10.3 a Modelbuilder code based partially on that in Using raster calculator in ModelBuilder to batch reclassify hundreds of rasters? My code will run through 70+ rasters of different sizes, raster calc them from meters to feet, place them in a specific directory, and eventually iterate both a polygon from raster boundary, two separate contour maps, and add a field and an attribute to each of the polygon boundaries. However, I am encountering a problem in just creating the Raster Calculator iteration.
Here is my Modelbuilder as currently drafted:
Its code:
# Import arcpy module
import arcpy
# Load required toolboxes
arcpy.ImportToolbox("Model Functions")
# Script arguments
Test_Group = arcpy.GetParameterAsText(0)
if Test_Group == '#' or not Test_Group:
Test_Group = "N:\\Planning And Development\\Engineering\\Systemwide GIS\\Geodatabases\\Comprehensive\\Test Group" # provide a default value if unspecified
# Local variables:
Name = "USGS_NED_one_meter_x46y443_CO_SoPlatteRiver_Lot5_2013_IMG_2015.img"
feet__Name_ = "N:\\Planning And Development\\Engineering\\Systemwide GIS\\Geodatabases\\TestOutput\\feet_%Name%"
Raster = "N:\\Planning And Development\\Engineering\\Systemwide GIS\\Geodatabases\\Comprehensive\\Test Group\\USGS_NED_one_meter_x46y443_CO_SoPlatteRiver_Lot5_2013_IMG_2015.img"
Value = "USGS_NED_one_meter_x46y443_CO_SoPlatteRiver_Lot5_2013_IMG_2015.img"
# Process: Iterate Rasters
arcpy.IterateRasters_mb(Test_Group, "", "", "RECURSIVE")
# Process: Raster Calculator
arcpy.gp.RasterCalculator_sa("\"%Name%\" * 3.28", feet__Name_)
# Process: Parse Path
arcpy.ParsePath_mb(Raster, "FILE")
Here is the Raster Calculator setup (ignore the error message, that was after I ran through an iteration):
Strangely if I run an individual instance of Raster Calculator, it comes out in greyscale as normal. However, with 70+ rasters I don't want to do one at a time especially since I want to automate other tasks after I have solved this error.
Where am I going wrong?