Get waypoints from set of visited points

Does graphhopper provide a way to get a list of “minimal” waypoints from a list of visited points?
So that when I use the given waypoints to generate a route, using the routing api, would result in similar or same points as the input points.

ex) A data says user started at [0,0] and rides [1,0], [2,0] then end at [3,0]. It’s a straight line, so the desired output will be [0,1] and [3,0]

ex1) User starts at [0,0] and through [1,0], [1,1], [1,2] and finishes at [2,2]. This time it is not a straight line. A waypoint is needed at [1, 1.5].

I’m not native English user. If you need more explanation please tell me. Thank you.

I think something like this is not possible yet.