More

Change direction of polylines from DEM data

Change direction of polylines from DEM data


I am trying to define the direction of my polylines (which represent gutters in a drainage system). Does anyone know if it is possible to define the direction based on elevation data extracted from a DEM? I would like my polylines to be oriented such that they begin at the upstream point and end at the downstream point. I know you can use the "flip" gp tool to change the polyline direction, but this is tedious/impossible to do for a large data set.


  1. Create nice unique id for lines
  2. Convert them to 3d using interpolate shape tool
  3. Create field fromZ in above. Use field calculator to populate it, parser Python

    !shape!.firstpoint.z

  4. Populate field toZ, using lastpoint.z

  5. Join 3d lines back to original, using unique id, select ones where fromZ < toZ

  6. Use flip edit TOOL to flip selected.

It works for single part polylines on a terrain steep enough


Watch the video: ΓΙΑΤΙ ΤΑ 1,4 TSI CAV ΜΟΤΈΡ TOY GROUP ΣΠΑΝΕ ΕΜΒΟΛΑ Η ΑΠΑΝΤΗΣΗ!