Maptitude GISDK Help |
Returns the coordinate along a line at a given position
GetPointOnLine(int id, double position, array options)
Argument |
Contents |
id |
The unique identifier of the line layer |
position |
The position along the line (either absolute distance or relative position) |
Option |
Type |
Contents |
Relative |
boolean |
If True the position is computed as a relative position between 0.0 and 1.0. The default is False |
Reverse |
boolean |
If True lets 0.0 the position si computed from the line last poitn. The efault is False, |
The coordinate along the line at the given position
The current layer must be a line a layer
If position is larger than the line length, or greater than 1 when the Relative option is True, GetPointOnLine() returns the coordiante of the line's end node, if Reverse is True, or the starting node, if Reverse is False.
If position is null, the the function returns the line's end node, if Reverse is True, or the starting node, if Reverse is False.
// Get the coordinate right at the middle of a line
Coord = GetPointOnLine(my_line_id, 0.5, {"Relative": "True"})
Error Type |
Meaning |
Error |
One of the parameters is invalid |
LanguageError |
The ID is not an integer, or the ID does not exist |
Missing | The current layer is not a line layer |
Function |
Summary |
Returns the IDs of the two endpoints of a link. |
|
Gets the coordinates that describe the location of a line feature |
|
Finds the nearest line feature to a point and returns information about it |
|
Finds the distance from a coordinate to a line |
©2025 Caliper Corporation | www.caliper.com |