Basic ArcPy - arcgis toolbox implementation


#1

arcgis toolbox implementation
import arcpy
from arcpy import env
from arcpy.sa import *

folder = arcpy.GetParameterAsText (0)
points = arcpy.GetParameterAsText (1)
field = arcpy.GetParameterAsText (2)
cellsize = arcpy.GetParameterAsText (3)

savespline = folder + "/spline.tif"
saveaspect = folder + "/aspect.tif"
saveslope = folder + "/slope.tif"
savecurvature = folder + "/curvature.tif"

env.workspace = folder

outSpline = Spline(points, field, cellsize, "REGULARIZED", 0.1)
outSpline.save(savespline)

outAspect = Aspect(savespline)
outAspect.save(saveaspect)

arcpy.Slope_3d(savespline, saveslope, "DEGREE", 1)

outCurve = Curvature(savespline, 1.094)
outCurve.save(savecurvature)