045] Global Mapper - Shortest Path from Point to Line: Chainage - Connect Selected Points to Selected Lines with New....
Today, we will learn how to create the shortest line segments that connect points to nearby lines. It appears this feature was added recently, as it wasn't available in older versions.
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.
"Before we begin, if you missed the previous session, check it out here:"
[044] Creating Lines at Regular Intervals: Create Perpendicular Lines Spaced Along Selected Line/Area....
First, draw some points and lines on your screen.
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.
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:
| [img 5 : Shortest lines generated connecting the points to the target lines] |
Yes, the shortest lines connecting the points and the main lines have been generated.
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.
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!
"In the next session, we'll dive deeper into more advanced features. Stay tuned!"
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.)