Input:
Workflow:
#convert flow accumulation to streams raster
arcpy.gp.RasterCalculator_sa("""Con("facc" >= 100000,1)""", "D:/Scratch/stream_r")
#derive streams as polylines
arcpy.gp.StreamToFeature_sa("stream_r", "fdir", "D:/Scratch/streams.shp", "SIMPLIFY")
#get streams vertices
arcpy.FeatureVerticesToPoints_management(in_features="streams", out_feature_class="D:/Scratch/points.shp", point_location="ALL")
arcpy.DeleteIdentical_management(in_dataset="points", fields="Shape", xy_tolerance="", z_tolerance="0")
#create good unique id for points
arcpy.AddField_management(in_table="points", field_name="PointID", field_type="TEXT", field_precision="", field_scale="", field_length="10")
arcpy.CalculateField_management(in_table="points", field="PointID", expression="'P%s'%str( !FID!).zfill(4)", expression_type="PYTHON_9.3", code_block="")
#create small buffer (0.5*cell size) around points
arcpy.Buffer_analysis(in_features="points", out_feature_class="D:/Scratch/buffers.shp", buffer_distance_or_field="1 Meters", line_side="FULL", line_end_type="ROUND", dissolve_option="NONE", dissolve_field="", method="PLANAR")
#and get flow accumulation at point
arcpy.gp.ZonalStatisticsAsTable_sa("buffers", "PointID", "facc", "D:/Scratch/stats.dbf", "DATA", "MAXIMUM")
# TRANSFER Max flow accumulation from statistics table to buffers’ table into field FACC through point ID join
arcpy.AddField_management(in_table="buffers", field_name="FACC", field_type="LONG")
# get directional vectors near points
arcpy.Intersect_analysis(in_features="buffers #;streams #", out_feature_class="D:/Scratch/sections.shp", join_attributes="ALL")
# and scale very large values of flow accumulation into practical buffer sizes
arcpy.CalculateField_management(in_table="sections", field="Extend", expression="[FACC]*0.0000286102783177759+2.12240681707642")
Use solution from:
Create a line perpendicular to an existing line in ArcGIS
to convert Sections into varying size perpendiculars
Use solution from:
How to create a polygon connecting the endpoints of multiple lines using python?
to get this:
As one can see some manual editing will be required