How to flip line directions in model builder, based on an attribute?

453
2
10-21-2010 06:34 AM
AndyMorgan
New Contributor
I have a model which currently loads features from (line) shapefile(s) into a personal geodatabase, using a parameter where the user selects the input shapefile(s).  Simple enough.  Now I need to check the field "Flow_Dir" in the input shapefile:

If Flow_Dir = "Downstream", nothing changes
If Flow_Dir = "Upstream", flip the line direction

How can I do this in model builder?
(Btw, using 9.3.1.  Looks like v10 has more capabilities in this regard, but I'm hoping someone has a suggestion for my current setup...?)  Thanks.
0 Kudos
2 Replies
TimBarnes
Occasional Contributor III
From what I've been able to gather (and test) it isn't possible in 9.3

It appears access to the SHAPE field (i.e. holding the geometry) WAS possible in 9.2 and new functionality in 10 allows it, but in 9.3 it doesn't work.

I have a similar situation in a python script- I can check if a stream line needs to be flipped, I just can't find a way to actually do it (apart from manually within an edit session)
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
In ArcGIS 10, you can use the Flip Line tool:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001v00000005000000.htm

Use Select Layer By Attribute to select the lines you need to flip directoin, followed by Flip Line.
0 Kudos