Select to view content in your preferred language

Batch processing to perform Trend (Spatial Analyst)

422
0
09-25-2013 09:07 AM
Chang-HengYang
Regular Contributor
Hi all,

I have a problem with batch processing by using python. The script only loops one time and stops. The attached file shows that only one file processed by the tool Trend exists in the folder. Please let me know if you all have any suggestion.

Thanks,
Hank

import arcpy
from arcpy import env
from arcpy.sa import *

env.workspace = "H:/NM_500k_Geology/Test092413"
input = "Merge_TOA_VertexT.shp"
cellsize = 100.0
zField = "Elevation"
regressionType = "LINEAR"
arcpy.CheckOutExtension("Spatial")
PolynomialOrder  = 1
while PolynomialOrder < 13:
    arcpy.env.overwriteOutput = True
    outTrend = "Trend" + str (PolynomialOrder)
    outTrend = Trend (input, zField, cellsize, PolynomialOrder, regressionType)
    PolynomialOrder = PolynomialOrder + 1
Tags (2)
0 Kudos
0 Replies