puzhibing
2026-03-26 5f7a82bca016b27f8e05d2892ca7b64b0d7d9797
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/utils/GDMapGeocodingUtil.java
@@ -78,10 +78,12 @@
            String points = jsonObject2.getString("points");
            String[] split = points.split(";");
            List<LonLatDto> pointsArray = new ArrayList<>();
            for (String string : split) {
                String[] split1 = string.split(",");
                LonLatDto lonLatDto = new LonLatDto(Double.parseDouble(split1[0]), Double.parseDouble(split1[1]));
                pointsArray.add(lonLatDto);
            for (int i = 0; i < split.length; i++) {
                if((i % 2) == 0){
                    String[] split1 = split[i].split(",");
                    LonLatDto lonLatDto = new LonLatDto(Double.parseDouble(split1[0]), Double.parseDouble(split1[1]));
                    pointsArray.add(lonLatDto);
                }
            }
            ForkJoinPool pool = new ForkJoinPool(); // 创建ForkJoinPool对象(默认使用处理器的核心数作为线程池大小)
            ArrayPointsTask arrayPointsTask = new ArrayPointsTask(pointsArray, fenceId); // 创建求和任务对象并传入数组作为参数(这里也可以传入数组的一部分作为参数来实现更细粒度的拆分)