Start point coordinates of the first item in 'primitives' and end point coordinates of the last item in 'primitives' must ...

Start point coordinates of the first item in 'primitives' and end point coordinates of the last item in 'primitives' must match the start and end points coordinates of the geometry that is being replaced