How to get the M-value for a point on a polyline segment.

1326
3
Jump to solution
05-15-2012 11:52 AM
Highlighted
Occasional Contributor II
Hi Experts:

    I am writing some code to calculate the "M value" of a point on a polyline segment. The polyline feature class is not an actual event layer. It is just a polyline feature class having begin_M and end_M fields for each segment. If I have a point sitting on a segment, how can I calculate the the "M" value on this point?
    The only idea in my mind for now is using ICurve.QueryPointAndDistance function to get the input point's distance along the polyline, and then use it ratio to the total length to calculate the interpolated "M" value of that point.
    Is there other linear referencing related ArcObject API for me to implement the function?
    Thank you.

Sui
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Occasional Contributor II
Hi Hornbydd and TomLUX:

    Thank you for your suggestion. After some study I found that in our corresponding manual data process step, the "Locate Feature Along Routes" Linear Referencing Tool is used to generate an output event table. I decide to use the IRouteLocatorOperations interface to find the M-value of the point.
    I understand I will need to create temporary layer if I use this method.
    Thank you.

View solution in original post

Reply
0 Kudos
3 Replies
Highlighted
Occasional Contributor III
Reply
0 Kudos
Highlighted
MVP Frequent Contributor
Sui,

If your underlying polyline layer was a PolylineM featureclass then you could have used the IMSegmentation3 interface and the GetMsAtDistance method. So you have 2 options:

  1. Do it the way you said, nothing wrong with that.

  2. When you identify the polyline that the point intersects take a copy of that polyline and turn it into a polylineM feature using your start and end values by using the CalibrateByMs method of the IMSegmentation3 interface.

Duncan
Reply
0 Kudos
Highlighted
Occasional Contributor II
Hi Hornbydd and TomLUX:

    Thank you for your suggestion. After some study I found that in our corresponding manual data process step, the "Locate Feature Along Routes" Linear Referencing Tool is used to generate an output event table. I decide to use the IRouteLocatorOperations interface to find the M-value of the point.
    I understand I will need to create temporary layer if I use this method.
    Thank you.

View solution in original post

Reply
0 Kudos