#-------------------------------------------------------------------------------
# Name: SummarizeWithin.py
# Description: Summarize river polylines by counties.
# Import system modules
import arcpy
arcpy.env.workspace = "C:/data/RedRiver_basin.gdb"
# Set local variables
summarizedLayer = "Rivers"
summaryPolys = "Basins"
summaryStatistics = [["Width", "MEAN"]]
weighedSummaryStatistics = [["DOC", "SUM"]]
out = 'SummarizedRivers'
# Execute SummarizeWithin
arcpy.gapro.SummarizeWithin(summarizedLayer, out, "POLYGON", None,
None, summaryPolys, "ADD_SUMMARY",
"KILOMETERS", summaryStatistics,
weightedSummaryStatistics)