Maptitude GISDK Help

JoinNodes()

Summary

Joins two endpoints together into a single endpoint feature.

 

Changes

Return value changed to an array in Version 5.0, to include the IDs of the links that are connected to the endpoint.

 

Syntax

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.

 

Returns

An array with the integer ID of the first endpoint feature and the integer IDs of the links that are connected to the endpoint.

 

Notes

Example

// 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 Codes

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

 

See Also

Function

Summary

SplitNode()

Splits a node into one node for each line that is connected to it

MoveNode()

Changes the location of an endpoint feature in a standard geographic file

DeleteNode()

Deletes an endpoint feature from a standard geographic file

 

 

©2025 Caliper Corporation www.caliper.com