If I run this script:
import arcpy arcpy.AddMessage(arcpy.CheckExtension("Spatial")) from arcpy.sa import Con from arcpy import env fDir=r'd:\scratch\fdir' outFolder=r'd:\aerials\images' env.workspace = outFolder fDir=arcpy.Raster(fDir) Gter=Con(fDir> 1,2) Gter.save("TEST") from ArcGIS, the output is:
When I run it as stand-alone script, it is very different story:
QUESTION:
How to access Spatial Analyst extension from stand alone script?
أكثر...
import arcpy arcpy.AddMessage(arcpy.CheckExtension("Spatial")) from arcpy.sa import Con from arcpy import env fDir=r'd:\scratch\fdir' outFolder=r'd:\aerials\images' env.workspace = outFolder fDir=arcpy.Raster(fDir) Gter=Con(fDir> 1,2) Gter.save("TEST") from ArcGIS, the output is:
When I run it as stand-alone script, it is very different story:
QUESTION:
How to access Spatial Analyst extension from stand alone script?
أكثر...