045] How to Create Shortest Path Lines from Points to Lines (Chainage Tool)
Learn how to generate the shortest connecting segments between points and lines while automatically calculating chainage distances.
This tutorial explores the "Chainage - Connect Selected Points to Selected Lines" feature in Global Mapper. We cover the initial setup, attribute configurations such as offsets and start points, and the process of displaying results using custom labels for technical documentation.
Creating Shortest Path Lines Between Points and Lines
This function can be used to measure how far a specific point is from a river or road in a straight line, to determine the distance of an intersection from the start or end of a road, or to identify the best location when branching water and sewage pipelines.
Let's get started.
First, draw some points and lines on your screen.
Running the Chainage Connection Tool
Select both the points and the lines.
Right-click and select Advanced Feature Creation Options -> CHAINAGE - Connect Selected Points to Selected Lines with New Lines.
A settings window will appear.
Understanding Chainage Offset and Start Options
A new attribute called CHAINAGE is added to the newly created line segments. This attribute indicates the distance from the starting or ending point of the original line to the intersection point where the new shortest line meets it. If you enter '50' here, 50 will be added to the CHAINAGE value. This is useful when you want to set a starting point at a specific distance from the actual start or end of a road.
Checking 'Start Chainage from End of Line Rather than Start' will generate the CHAINAGE value based on the end point of the line segment.
When you click OK:
Yes, the shortest lines connecting the points and the main lines have been generated.
Displaying Chainage and Length Labels
Next, let's adjust the Labels to find out the distance of the intersection from the starting point and the length of the new line segments.
Double-click the generated line layer to enter Vector Options.
Select the Labels tab -> select Use Custom Format String -> click Setup, then enter the following:
Chainage: %CHAINAGE%
Length: %LENGTH%
After entering this, click OK and Apply.
Reviewing Chainage Results and Labels
The distance from the starting point (CHAINAGE) and the length of the line segment (LENGTH) are now displayed.
Now, go back and try creating the result again after giving about a 50-meter offset in the Chainage options, and compare the values.
That's all for today!
- Learn previous workflow in [044] How to Create Perpendicular Lines Along a Path in Global Mapper
- Continue learning with [046] How to Create Parallel Offset Lines in Global Mapper
Comments
Post a Comment
Feel free to leave a comment if you have any questions about Global Mapper or CityEngine. I will get back to you with a sincere response as soon as possible. (Please note that all comments are moderated and manually approved to maintain a high-quality community. Promotional or spam content will not be published.)