Home > other >  Kriging interpolation (batch)
Kriging interpolation (batch)

Time:11-03

# coding=utf-8
The import arcpy
The from arcpy import env
The from arcpy. Sa import *
Def patch_process (workpace, outpace, field) :
Arcpy. CheckOutExtension (" Spatial ") # check permission
Env. The workspace=workpace
OutFeaturePath=outpace
FCS=arcpy. ListFeatureClasses (" * "SHP) # read shape file list
For fc in FCS:
Print outFeaturePath + fc
InFeature=fc
OutKrigName=outFeaturePath + "/" + fc + "tif" # filename
Print outKrigName
OutKrig=Kriging (inFeature, field, KrigingModelOrdinary (" CIRCULAR ", 1000, 2.6, 542, 0), 1000, RadiusFixed (10000, 1))
# kriging interpolation, if want to use other interpolation methods, can view the ArcGIS, function parameters according to their own situation to set the
OutKrig. Save (outKrigName)
Del inFeature # delete variable inFeature, remove inFeature references for shape file

If __name__=="__main__ ':
Workpace="F:/data" # work path
# outpace="F:/outdata" output path
Field="ELEV" # interpolation field
Patch_process (workpace, outpace, field)
Print (" ok ")

CodePudding user response:

Hello, can add a contact private chat?
  • Related