mabryant

Spatial Analyst Extension Help

Discussion created by mabryant on Feb 15, 2012
Latest reply on Feb 16, 2012 by stacyrendall
I am having a hard time figuring out how to check our the spatial analyst extension so that I can move forward with my code.

# Import arcpy module
import os,arcpy
from arcpy import env
from arcpy.sa import *

arcpy.env.overwriteOutput="True"
try:
#The output raster name
    OutputRaster=arcpy.GetParameterAsText(0)
#The two input rasters as defined by user
    pgdem=arcpy.GetParameterAsText(1)
    pglanduse=arcpy.GetParameterAsText(2)
    outputworkspace=arcpy.GetParameterAsText(3)
    arcpy.env.Workspace=outputworkspace
    arcpy.CheckOutExtension("Spatial")


It might be getting through this fine but I don't believe that I am correctly making the workspace either. I am running this script within a toolbox in ArcMap

Outcomes