AnsweredAssumed Answered

How to use ArcPy Geometry MeasureOnLine

Question asked by Playa on Aug 14, 2014
Latest reply on Aug 15, 2014 by xander_bakker
Branched to a new discussion

I've found the following forum post https://community.esri.com/thread/102954 where the geometry method measureOnLine was used. I'm trying to determine how to use the same method for calculating the chainage (accumulated distance) along a cross-section polyline. I need to extract the profile of each cross-section into a point feature class based on the position of the vertices within each cross-section polyline. I would like to end up with a point feature class with the following fields:

 

  • ID (Cross-Section)
  • Z (Elevation)
  • Chainage (Distance m from start of polyline)

The chainage will be the accumulative distance (i.e. XS point 1 = 0 ; XS point 2 = 20m ; XS point 3 = 35m etc)

 

I would like to use the polyline Z Feature Class to generate a pointGeometry Object and iterate through each point that will be used as the point for the measureOnLine method against the original Polyline Feature Class. The determined length (Chainage) will be inserted (i.e. InsertCursor) with the Point Object ; ID (Cross Section Field) and Chainage into a newly generated feature class.

 

I'm still very new to ArcPy and Python and battling to figure out how to iterate through the PointGeometry from the Polyline to use the measureOnline method and then insert the Point Geometry ; ID ; Chainage into a new Feature Class.

 

 

Any help in getting going will trully be appreciated.

 

Regards

 

Peter Wilson

Outcomes