I have a folder of shapefiles that I want to convert to rasters and then apply a Con statement to them. I set my workspace to where the shapefiles are and do Point to Raster conversion and Con with the following code:
import arcpy import os from arcpy import env from arcpy.sa import * #Set workspace to Max Temps folder and allow for overwrite env.overwriteOutput = True env.workspace = r"C:\Users\uma.bhandaram\Desktop\2015\DailyMax2015" outputFolder = r"C:\Users\uma.bhandaram\Desktop\2015\RasterCon2015" #Get Max Temp shapefiles and convert them to Raster shpFileList = arcpy.ListFiles("*.shp") for shpFile in shpFileList: shpFileName = os.path.splitext (shpFile) rastFile = shpFileName + ".tif" arcpy.PointToRaster_conversion(shpFile, "Max_2015", rastFile, "MOST_FREQUENT", "", 0.05) #Get raster files and run through Raster Calculator to see if Max threshold has been met rastFileList = arcpy.ListFiles("*.tif") for rastFile in rastFileList: rastFileName = os.path.splitext (rastFile)  MaxRstIn = Raster(rastFile) MaxRstOut = Con(MaxRstIn, 1, 0, "VALUE <=85") MaxRstOut.save("Con" + rastFile)
How do I save the output rasters of the Con function in a separate folder? I have specified an output folder but am stuck on pointing my Con files to go here.