AnsweredAssumed Answered

Raster save method using variable

Question asked by tonalca6864 on Dec 27, 2013
Latest reply on Dec 27, 2013 by tonalca6864
Hi,

I'm trying to find out how to permanently save a raster using a workspace variable + Raster name with little success so far.
In the Help it only shows how to do it hard-coding the output.

Please see code below.

import arcpy import string from arcpy import env arcpy.env.overwriteOutput=True from arcpy.sa import * arcpy.CheckOutExtension("Spatial")  # Variables  OutLocation = arcpy.GetParameterAsText(0)  Raster1 = arcpy.Raster(arcpy.GetParameterAsText(1))  Raster2 = arcpy.Raster(arcpy.GetParameterAsText(2))  # Calculation and save  CDF = Raster1 * Raster2  OutFile = "CDF"                          FullOutFile = OutLocation + OutFile     # For example: r"Q:\LFP_GLOBAL\OUTPUT.gdb\CDF" CDF.save(FullOutFile)



Any help would be greatly appreciated.

Many thanks

Outcomes