import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
focalFlowOut = FocalFlow("elevation", 10)
focalFlowOut.save("C:/sapyexamples/output/flowout")
FocalFlow 例 2 (スタンドアロン スクリプト)
次の例では、閾値を 5 として、入力ラスターのフローのバイナリー表現を求めています。
# Name: FocalFlow_Ex_02.py
# Description: Determines the flow of the values in the
# input raster within each cell's immediate neighborhood.
# Requirements: Spatial Analyst extension
# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *
# Set environment settings
env.workspace = "C:/sapyexamples/data"
# Set local variables
inRaster = "elevation"
threshold = 5
# Run FocalFlow
outFocalFlow = FocalFlow(inRaster, threshold)
# Save the output
outFocalFlow.save("C:/sapyexamples/output/focalflow")