I suppose I should add something here in an attempt to summarize better, at least what I've introduced, namely:- the linear referencing to gain access to point measures on lines- ordering point objects to create polygons- a crude technique to 'break' the polygons at changing N values from the orig line file (I'm sure this technique will need work.)A rudimentary script file has been included as an attachment - I would urge you to use this script at your own discretion. I'm not sure if the output will work in satisfactorily applying a solution for your original problem - however, this will at least introduce you to some geoprocessing techniques.Good luck! I'll try to paste the code in a window below as well as include as attachment.Note that if you test the code (which is in very simple format, no error trapping, etc.), the code works with your provided line file (so you'll need to change the shapefile pathname depending on where this source is and you'll need to create a file gdb workspace to which to write outputs (and change that pathname accordingly as well). There's nothing really special about this code - just a 'brute force' method going step-by-step as we've pretty much discussed in earlier posts.
origData = r'C:\Documents and Settings\whitley-wayne\Desktop\pointsToPolySerysian2\orig\Reach1B.shp'
import arcpy
arcpy.env.workspace = r'C:\Documents and Settings\whitley-wayne\Desktop\stage.gdb'
arcpy.env.outputCoordinateSystem = origData
arcpy.env.overwriteOutput = True
# Copy Features
# http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000035000000
arcpy.CopyFeatures_management(origData, 'Reach1B_lines')
# Create Routes
# http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//003m00000005000000.htm
#CreateRoutes_lr (in_line_features, route_id_field, out_feature_class, measure_source, {from_measure_field}, {to_measure_field}, {coordinate_priority}, {measure_factor}, {measure_offset}, {ignore_gaps}, {build_index})
arcpy.CreateRoutes_lr('Reach1B_lines', 'ProfileM', 'Reach1B_routes', 'TWO_FIELDS', 'OID_', 'Shape_Leng')
fields = ['LeftBank_ft', 'RightBank_ft']
# Add Field
# http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000047000000
# AddField_management (in_table, field_name, field_type, {field_precision}, {field_scale}, {field_length}, {field_alias}, {field_is_nullable}, {field_is_required}, {field_domain})
for field in fields:
arcpy.AddField_management('Reach1B_lines', field, 'DOUBLE')
# Calculate Field
# http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000004m000000
# CalculateField_management (in_table, field, expression, {expression_type}, {code_block})
for field in fields:
exp = '!' + field.split('_')[0] + '!*!Shape_Leng!'
arcpy.CalculateField_management('Reach1B_lines', field, exp, 'PYTHON')
# Copy Rows
# http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//0017000000n4000000
# CopyRows_management (in_rows, out_table, {config_keyword})
arcpy.CopyRows_management('Reach1B_lines', 'in_table')
# Make Route Event Layer
# http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Make_Route_Event_Layer/003m00000008000000/
# MakeRouteEventLayer_lr (in_routes, route_id_field, in_table, in_event_properties, out_layer, {offset_field}, {add_error_field}, {add_angle_field}, {angle_type}, {complement_angle}, {offset_direction}, {point_event_type})
in_event_properties = 'ProfileM POINT LeftBank_ft'
arcpy.MakeRouteEventLayer_lr('Reach1B_routes', 'ProfileM', 'in_table', in_event_properties, 'LeftBankPts')
arcpy.CopyFeatures_management('LeftBankPts', 'LeftBankPoints')
in_event_properties = 'ProfileM POINT RightBank_ft'
arcpy.MakeRouteEventLayer_lr('Reach1B_routes', 'ProfileM', 'in_table', in_event_properties, 'RightBankPts')
arcpy.CopyFeatures_management('RightBankPts', 'RightBankPoints')
# ...the channel poly building component:
# Array
# http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Array/000v0000005r000000/
polyArray = arcpy.Array()
inputPts = 'LeftBankPoints'
# SearchCursor (dataset, {where_clause}, {spatial_reference}, {fields}, {sort_fields})
# http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000039000000
rows = arcpy.SearchCursor(inputPts, '', '', '', 'ProfileM A')
for row in rows:
pnt = row.Shape.getPart()
polyArray.add(pnt)
inputPts = 'RightBankPoints'
rows = arcpy.SearchCursor(inputPts, '', '', '', 'ProfileM D')
for row in rows:
pnt = row.Shape.getPart()
polyArray.add(pnt)
# Polygon
# http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v000000n1000000
polygon = arcpy.Polygon(polyArray)
arcpy.CopyFeatures_management(polygon, 'channel')
# ...the first/last point extraction from lines, outer poly building component:
polyArray.removeAll()
inputLns = 'Reach1B_lines'
# Polyline
# http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Polyline/000v000000n2000000/
rows = arcpy.SearchCursor(inputLns, '', '', '', 'ProfileM A')
for row in rows:
pnt = row.Shape.firstPoint
polyArray.add(pnt)
rows = arcpy.SearchCursor(inputLns, '', '', '', 'ProfileM D')
for row in rows:
pnt = row.Shape.lastPoint
polyArray.add(pnt)
polygon = arcpy.Polygon(polyArray)
arcpy.CopyFeatures_management(polygon, 'outer_poly')
# ...the check for change in n-vals:
rows = arcpy.SearchCursor(inputLns, '', '', '', 'ProfileM A')
row = rows.next()
Nleft = row.Leftbank_N
Nchan = row.channel_N2
Nrght = row.rightbank_
row = rows.next()
# list to break polys
breakList = []
while row:
if row.Leftbank_N != Nleft or row.channel_N2 != Nchan or row.rightbank_ != Nrght:
breakList.append(row.ProfileM)
Nleft = row.Leftbank_N
Nchan = row.channel_N2
Nrght = row.rightbank_
row = rows.next()
del row, rows
# form feature layer where_clause
where_clause = '('
for each in breakList:
where_clause = where_clause + str(each) + ', '
# AddFieldDelimiters
# http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000004n000000
# AddFieldDelimiters (datasource, field)
where_clause = arcpy.AddFieldDelimiters(inputLns, 'ProfileM') + ' IN ' + where_clause[0:-2] + ')'
# MakeFeatureLayer_management (in_features, out_layer, {where_clause}, {workspace}, {field_info})
arcpy.MakeFeatureLayer_management(inputLns, 'changeN', where_clause)
arcpy.CopyFeatures_management('changeN','breakLines')
# FeatureToPolygon_management (in_features, out_feature_class, {cluster_tolerance}, {attributes}, {label_features})
inFeatures = ['breakLines','channel','outer_poly']
arcpy.FeatureToPolygon_management(inFeatures,'break_polys')