Select to view content in your preferred language

Create Points Along Line at Given Interval

35
0
10 hours ago
KevinPiraino2
Frequent Contributor

Hello, I'm hoping that someone smarter than me can possibly assist me devising a code snippet to generate points along a line (specifically a "route" line; a line with M values) at a given interval (100 ft). I am basically trying to replicate the labeling from "route" line layer that is visible in ArcGIS Pro using point features so that I may use the point features in ArcGIS Online (as it seems M aware features/functionality in AGOL are not supported). 

I know the GP tool "Generate Points Along Line" currently performs this action and works well for a portion of my data where the initial M value (stationing) is a whole number divisible by 100 (EX: 41700, 86000, etc.). Where the issue occurs though is when the initial M value (stationing) is NOT divisible by 100 (41618, 87224, etc.). Using the GP tool causes an offset from the desired "100 ft interval" due to the initial M value (stationing) not starting at a value divisible by 100. Below screenshot was created using existing GP tool.

Basically, when the initial M value is divisible by 100, sequence would read for example: 41700, 41800, 41900, etc. But, when the initial M value is NOT divisible by 100, sequence would read for example: 41618, 41718, 41818, etc. How can I create points at the beginning and end of line as well as at every 100ft interval where the M value (stationing) of the point is divisible by 100. For example ideal output stationing: 41618, 41700, 41800, 41900,...,45000,45100,45121.

KevinPiraino2_0-1761926823115.png

 

 

Tags (3)
0 Kudos
0 Replies