I have created a set of flowlines using the Fill, Flow Direction, Flow Accumulation, and Reclass tools (in that order) from the spatial analyst toolbox in 10.3.1. I then converted them to polylines from the original raster data. When I looked at my flow directions in the vector data, they were all going uphill. I would like some help trying to figure out what I did wrong. Thank you.
Solved! Go to Solution.
Some ideas:
Just to confirm - the linework is definitely going uphill, not due to the line direction being reversed when symbolized? Check the linework versus your rasters.
To convert from Raster to Vector, did you use Stream to Feature (Spatial Analyst)?
ArcGIS Help (10.2, 10.2.1, and 10.2.2) How Stream to Feature works
ArcGIS Help (10.2, 10.2.1, and 10.2.2) Stream to Feature
Also, if they are all uniformly reversed, as a workaround, one can reverse the line directionality.
ArcGIS Help (10.2, 10.2.1, and 10.2.2) Flip Line (Editing)
caveats - requires at least a standard license.
- alters the input dataset instead of making a new output, so back up your data before running.
Chris Donohue, GISP
Some ideas:
Just to confirm - the linework is definitely going uphill, not due to the line direction being reversed when symbolized? Check the linework versus your rasters.
To convert from Raster to Vector, did you use Stream to Feature (Spatial Analyst)?
ArcGIS Help (10.2, 10.2.1, and 10.2.2) How Stream to Feature works
ArcGIS Help (10.2, 10.2.1, and 10.2.2) Stream to Feature
Also, if they are all uniformly reversed, as a workaround, one can reverse the line directionality.
ArcGIS Help (10.2, 10.2.1, and 10.2.2) Flip Line (Editing)
caveats - requires at least a standard license.
- alters the input dataset instead of making a new output, so back up your data before running.
Chris Donohue, GISP
Hi Chris,
Thanks for your reply. Here is a screenshot of my flowlines showing how I symbolized the directional indicators. I have also gotten a second opinion and confirmation of the issue from a co-worker.
My stream orders all made sense and seem to follow the correct flow direction, the flow direction output itself, however, is backward.. I am hoping that there is another way to correct them without having to flip one line at a time. I used a LiDAR dataset that was acquired by the county to generate the dataset. Thanks for your help!
Not sure if this is a possible cause, but some of the results seem odd in ways other than the directionality you mentioned, at least compared to the Quad map displayed.
Of course, the elevation data you used in deriving the stream lines may be different than the data used when the quads were constructed (time may have passed and the landscape may have changed, the resolution between the two datasets may be very different, etc), which may account for it. Still, it seems odd.
Chris Donohue, GISP
got a picture? are they pointing upstream from the outlet?
Don't like it? then you can either Flip Line—Help | ArcGIS for Desktop if you have an appropriate license or just change the symbology in the layer so the arrow heads go in the other direction
Hi Dan,
This is what a portion of the stream network looks like, and, yes, they are mostly pointing upstream from the outlet. There are an odd few that don’t. My stream orders all made sense and seem to follow the correct flow direction, the flow direction output itself, however, is backward. I used the from – to arrow direction so it is not a display issue. I am hoping that there is another way to correct them without having to flip one line at a time. I used a LiDAR dataset that was acquired by the county to generate the dataset. Thanks for your help!
read the link I sent you carefully.... It does them all at once... And guess What!!! look at the example they use! Do you think that there might be an association???
arcpy.FlipLine_edit("C:/data/project.gdb/streams")
Here's how you can flip lines with basic license:
>>> fc = 'lines'
... with arcpy.da.UpdateCursor(fc,'SHAPE@') as cursor:
... for row in cursor:
... new_part_arr = arcpy.Array()
... for part in row[0]:
... new_pnt_arr = arcpy.Array()
... for pnt in part:
... new_pnt_arr.insert(0,pnt)
... new_part_arr.insert(0,new_pnt_arr)
... row[0] = arcpy.Polyline(new_part_arr)
... cursor.updateRow(row)
Thank you all for your helpful replies! I have been out of the office for most of the last week and I am finally getting a chance to sit down and review your responses. I will look these over and let you all know what I end up figuring out.
Cheers,
Hillary