示例#1
0
  /** 把原始GPS坐标转换成百度坐标 */
  private static void transformGPSToJsonAll() {

    ArrayList<FileAtrribute> filelist = MTools.getFiles("Data", 0, 182);
    // 总文件数
    totalN = filelist.size();
    System.out.println("plt num " + totalN);
    // 设定要启动的工作线程数为 5 个
    int threadCount = 10;
    List[] taskListPerThread = MTools.distributeTasks(filelist, threadCount);
    for (int i = 0; i < taskListPerThread.length; i++) {
      @SuppressWarnings("unchecked")
      ArrayList<FileAtrribute> fileL = (ArrayList<FileAtrribute>) taskListPerThread[i];
      TransformBDCoordinatesThread mTread = new TransformBDCoordinatesThread(fileL, i);
      mTread.start();
    }
  }
示例#2
0
 /** 提取停留点 */
 public static void extractionStayPoint() {
   // 0 - 182
   ArrayList<FileAtrribute> filelist = MTools.getFiles("Data", 0, 182);
   // 总文件数
   totalN = filelist.size();
   System.out.println("plt num " + totalN);
   // 设定要启动的工作线程数为 4 个
   int threadCount = 3;
   List[] taskListPerThread = MTools.distributeTasks(filelist, threadCount);
   for (int i = 0; i < taskListPerThread.length; i++) {
     @SuppressWarnings("unchecked")
     ArrayList<FileAtrribute> fileL = (ArrayList<FileAtrribute>) taskListPerThread[i];
     ExtractStayPointThread mTread = new ExtractStayPointThread(fileL, i);
     mTread.start();
   }
 }
示例#3
0
 /** 合并停留点 */
 public static void emerger() {
   ExtractionStayPoint stayPoint = new ExtractionStayPoint();
   for (int i = 0; i < 182; i++) {
     ArrayList<FileAtrribute> filelist = MTools.getFiles("stayPointData", i, i + 1);
     if (filelist.isEmpty()) {
       continue;
     }
     stayPoint.emerger(filelist);
     System.out.println("合并完成");
   }
 }