lair.transects.merge_route_points#

lair.transects.merge_route_points(routes_xy, tol)[source]#

Merge the fixed points of several routes into one network point set.

routes_xy are (n_i, 2) arrays of projected coordinates (metres). Points of the first route are kept; a point of a later route is added only if it is farther than tol from every point already in the set, otherwise it is snapped to the nearest existing one. Returns (network_xy, index) where index[i][k] is the network point of route i’s point k. Shared track thus maps to shared network points.

Parameters:
Return type:

tuple[ndarray, list[ndarray]]