Begins and finishes processing a route at segment with segmentIndex in segments with the given result.