A complete set of path optimization algorithm solution for cooperative operation of multiple UAVs is proposed to figure out the path planning problem of multiple agricultural UAVs under the condition of multiple fields with obstacles. Taking the minimum transfer path length as the goal of operation optimization,the initial coverage operation route with horizontal heading conditions was calculated based on the polygon scanning and filling algorithm,and the safety boundary intersection test of the dangerous transfer process between routes was carried out. The course of operations of each single field was optimized with “minimum span method” of convex polygon and “step rotation method”of nonconvex polygon. The mathematical models for route scheduling and voyage planning were established,and the solution was obtained based on the open source optimization software suite of Google ORTools. The operation effects of different route combination scheduling strategies and the effects of operation optimization of the five optimized searching strategy algorithms of Google ORTools and the equal area partition algorithm of UAV along the heading direction were compared. The simulation results of four sets of hypothetical and real fields showed that the algorithm effectively achieved multiple cooperative UAVs path planning under various constraints and took 70552 s. Compared with the equal area partition algorithm,the optimal results for the total length of the transfer path decreased 24.86%47.10%.