Segment

class leuvenmapmatching.util.segment.Segment(l1, p1, l2=None, p2=None, pi=None, ti=None)[source]

Segment in the graph and its interpolated point.

Create a new segment.

Parameters:
  • l1 – Label of the node that is the start of the segment.

  • p1 – Point (coordinate) of the start node.

  • l2 – Label of the node that is the end of the segment.

  • p2 – Point (coordinate) of the end node.

  • pi – Interpolated point. The point that is the best match and can be in between p1 and p2.

  • ti – Position of pi on the segment [p1,p2], thus pi = p1+t1*(p2-p1).