read your lines into a search cursor for each line in the cursor: get the first and last point coordinates calculate the change in x # first minus last, negative = W->E calculate the change in y # first minus last, negative = S->N if the absolute change in x is greater than the absolute change in y: # the line is in horizontal orientation if the change in x is positive: # line is E->W send line to new feature class to be flipped delete line from current feature class else: #the line is vertical if the change in y is positive: # the line is N->S send line to new feature class to be flipped delete line from current feature class flip lines in new feature class merge flipped lines back into original feature class
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.