function getFlatCoordinatesXY(flatCoords, stride) {
  if (stride === 2) {
    return flatCoords;
  }
  return flatCoords.filter((v, i) => i % stride < 2);
}
@param {Array<number>} flatCoords Flat coords
@param {number} stride Stride
@return {Array<number>} Flat coords with only XY components