Select to view content in your preferred language

Update M Values of routes

4142
3
Jump to solution
10-19-2015 08:40 AM
PV
by
Deactivated User

Hello

I created routes with the "Create Routes Tool" in ArcGIS 10.2.2. The route persists of rivers for quite a large area. The flow direction of the rivers are either "1" which means flow direction in digitized direction or "2" = flor direction against digitized direction. This seems to be correct for all routes.

When I open the "Edit Sketch Properties" I see that the M-Value however is not correct for all routes with the value 1 = flow direction in digitized direction (pic with red highlighting).

I Need the M Value to be 0 at hashtag 0. The highest M Value should be at the highest hashtag hence the M Values should be switched (see pic with green higlighting).

When I flip the routes, I flip the  whole direction which I dont want as the direction is correct (blue highlighting).

I only Need the M-Values to flip, not the #-values. I can do this with right click on the route --> route measure editing --> set distance. However, this is only possible for one route at a time and as I have many routes I am looking for a solution to do this automatically. Is there an update m values tool or anything like this in ArcGIS? I could not find anything.

forum2.png

0 Kudos
1 Solution

Accepted Solutions
TedKowal
Honored Contributor

When I use "Create Route Tool", in order to do the Measures for the lines that are in reverse digitized directions, I use the two field options.  In other words I populate a to and from field with the min segment measure and max segment measure respectively.  This is on the source non PolylineM shape from which I am creating the routes.  Using another field to indicate which of the lines that are running counter to digitized direction, I swap the to from fields.  The result measure then is reversed in order of your drawn segments.

Hopefully this makes some sort of sense to your.  I do not work with stream but with roads.  I use a dual centerline drawn in the direction of car travel (analogous to stream flow), one side of my route is always in the opposite of the digitized direction.  So I was face with you issue of the opposite side of the road measure being incorrect similar to your examples.  To overcome this I used a min/max (to/from) to build my routes and swaping the min/max for all the segments going the opposite direction.

hope this helps.

View solution in original post

0 Kudos
3 Replies
DuncanHornby
MVP Notable Contributor

If you can use ArcObjects then the Interface you need to use is the IMSegmentation​, it has a method ReverseMsOrder which would do what you want.

If you are looking for a python solution you could try the following (but untested idea):

  • Create from the dataset where all polylines which are "1" the nodes with their M values
  • Flip the values for these pair of nodes
  • Use the Calibrate route tool using your flipped M points

If it were me I would use the IMsegmentation route but then I know how to program in VBA!

TedKowal
Honored Contributor

When I use "Create Route Tool", in order to do the Measures for the lines that are in reverse digitized directions, I use the two field options.  In other words I populate a to and from field with the min segment measure and max segment measure respectively.  This is on the source non PolylineM shape from which I am creating the routes.  Using another field to indicate which of the lines that are running counter to digitized direction, I swap the to from fields.  The result measure then is reversed in order of your drawn segments.

Hopefully this makes some sort of sense to your.  I do not work with stream but with roads.  I use a dual centerline drawn in the direction of car travel (analogous to stream flow), one side of my route is always in the opposite of the digitized direction.  So I was face with you issue of the opposite side of the road measure being incorrect similar to your examples.  To overcome this I used a min/max (to/from) to build my routes and swaping the min/max for all the segments going the opposite direction.

hope this helps.

0 Kudos
PV
by
Deactivated User

Thank you Ted!
This solved my Problem exactly! I did exactly the same steps as you suggested and got what I was looking for!

0 Kudos