/// <summary> /// Copy constructor /// </summary> /// <param name="other"></param> public TransportPositionerPointOnGraph(TransportPositionerPointOnGraph other) { IsMatched = other.IsMatched; IsWayReversed = other.IsWayReversed; DirectedEdgeId = other.DirectedEdgeId; ParameterizedPointOnWay = other.ParameterizedPointOnWay; PointOnWay = other.PointOnWay; DirectionOnWay = other.DirectionOnWay; HeadingOnWayDegrees = other.HeadingOnWayDegrees; }
/// <summary> /// For a given TransportPositionerPointOnGraph, returns the parameterized distance along the TransportDirectedEdge /// on which the point lies (as opposed to TransportPositionerPointOnGraph.ParameterizedPointOnWay, the /// parameterized distance along the associated TransportWay). /// </summary> /// <param name="transportPositionerPointOnGraph">TransportPositionerPointOnGraph instance.</param> /// <returns>If transportPositionerPointOnGraph.IsMatched is true, the parameterized distance along the directed edge, in range 0.0 to 1.0; else 0.0.</returns> static public double GetParameterOnDirectedEdge(this TransportPositionerPointOnGraph transportPositionerPointOnGraph) { return(transportPositionerPointOnGraph.IsWayReversed ? (1.0 - transportPositionerPointOnGraph.ParameterizedPointOnWay) : transportPositionerPointOnGraph.ParameterizedPointOnWay); }