Maptitude GISDK Help |
Joins two endpoints together into a single endpoint feature.
Return value changed to an array in Version 5.0, to include the IDs of the links that are connected to the endpoint.
ids = JoinNodes(integer ID1, integer ID2, array options)
Argument |
Contents |
ID1 |
The ID of the first endpoint |
ID2 |
The ID of the second endpoint |
Option |
Type |
Contents |
Reason |
String |
If provided, a record will be added to the database's log file, with this used as the Reason column. If it's not provided, no entry will be added, even if the other options are present. |
Comment |
String |
Text for the comment field of the log file. |
User |
String |
User name for the log file. |
An array with the integer ID of the first endpoint feature and the integer IDs of the links that are connected to the endpoint.
JoinNodes() can only be used on the endpoint layer of a standard geographic file.
The endpoint layer must be the current layer.
The two input endpoints must be within the global snap distance of each other.
JoinNodes() deletes the second endpoint.
The log file name will have the same name as the database and a .txt extension.
// Join two nodes
a_pt = ClickCoord()
b_pt = ClickCoord()
SetLayer("Xsection")
a_id = RH2ID(LocateNearestRecord(a_pt, 0.25))
b_id = RH2ID(LocateNearestRecord(b_pt, 0.25))
if a_id <> b_id then do
// Join the two - first move them together...
MoveNode(b_id, a_pt)
ids = JoinNodes(a_id, b_id, )
end
Error Type |
Meaning |
Error |
The current layer is not an endpoint layer, or is not from a standard geographic file; the two endpoints are too far apart; or ID1 and ID2 are identical |
NotFound |
One or both of the IDs is invalid |
Function |
Summary |
Splits a node into one node for each line that is connected to it |
|
Changes the location of an endpoint feature in a standard geographic file |
|
Deletes an endpoint feature from a standard geographic file |
©2025 Caliper Corporation | www.caliper.com |