Select to view content in your preferred language

Enhance Generate Points Along Lines to support measure interval (and first/last point measures)

518
1
12-22-2022 06:49 PM
Status: Open
Labels (1)
GraemeBrowning_Aurizon
Frequent Contributor

At Creating points at hatch intervals along LRS routes, I describe a requirement I have to be able to create points at every 100m (or any specified interval) along a line that has measures.

For example, if I have a line where the start measure is 154m and the end measure is 548m I would like to be able to use a measure interval value of 100m to generate points (with the measure value written to a field) where the 200m, 300m, 400m and 500m measures are located.

GraemeBrowning_Aurizon_0-1671687422349.png

For another example, if I have a line where the start measure is -234m and the end measure is 548m I would like to be able to use a measure interval value of 100m to generate points (with the measure value written to a field) where the -200m, -100m, 0m, 100m, 200m, 300m, 400m and 500m measures are located.

I think adding a Point_Placement option of MEASURE to the Generate Points Along Lines (Data Management) tool would address both examples above.

Of less importance would be the addition of two new parameters for the first point measure and last point measure.

An example for that might be if I have a line where the start measure is -234m and the end measure is 548m, and I would like to be able to use a measure interval value of 100m, a first point measure of -50m and a last point measure of 250m to generate points (with the measure value written to a field) where the -50m, 50m, 150m and 250m measures are located.  The reason this last one is not as important is that as long as a Point_Placement option of MEASURE has been added the Generate Points Along Lines (Data Management) tool, then that could be followed by the Select (Analysis) tool to get the same result.

1 Comment
Bud
by

With the Generate Points Along Lines (Data Management) geoprocessing tool, we can use a constant as the Percentage or Distance parameter:

Bud_0-1680547445210.pngHowever, there are times when we want to use varying values from a field/input feature class.

As @ScottFedak2085 said in a related post:

I know I've ran into issues with that GP Tool only being able to apply the same distance or percentage across every feature in a feature class. I've had times where I wanted to utilize a features attributes to vary how points are placed along a given feature. To accomplish this, I've modified the code in Link #1 below utilizing Geometry Objects. It might be worth looking at Geometry Objects and their associated methods (Link #2) when you have a chance, they can be a pretty powerful tool in conducting custom spatial analysis. 

Link #1 - https://gis.stackexchange.com/questions/214162/generate-points-along-line
Link #2 - https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/geometry.htm 

Could the Generate Points Along Lines tool be enhanced so that we can use values from a field? Similar to what we can do with the Buffer tool?

Thanks.