⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkrepeattrk.java

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JAVA
字号:
package net.aetherial.gis.our.auto.extend;
import net.aetherial.gis.surface.ItemValue;
import java.io.File;
import net.aetherial.gis.surface.CreateFile;
import net.aetherial.gis.our.FrameOur;
import net.aetherial.gis.our.auto.CutByRS;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import net.aetherial.gis.our.auto.Auto;
import net.aetherial.gis.dataType.WptType;
/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *本程序的作用是检查重复航迹
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class CheckRepeatTrk extends Auto{
  private String directory = "";
  public CheckRepeatTrk(FrameOur fo) {
    this.setFrameOur(fo);
  }
  public void checkAllFile(){
    if (super.input == null) {
      System.out.println("super.input == null");
      return;
    }
    for (int i = 0; i < this.input.length; i++) {
      this.open(this.input[i]);
      this.print(this.input[i].getName() +
          "********************************************************");
      checkAFile();
      this.setMemoryReset();
    }
    this.createLog(this.directory +ItemValue.getDayTimeNumber() + ".log",this.getlog());
    this.msg("文件检查航点完毕!\r\n生成的文件在:" + this.directory + "下.log文件");
  }

  private void checkAFile(){
    Node[] trk1 = ItemValue.getTracks();
    Node[] trk2 = trk1;
    NodeList nl1 =null,nl2 = null;
    for (int i = 0; i < trk1.length; i++) {
      for (int j = 0; j < trk2.length; j++) {
        if (i != j) {

          if (ItemValue.getTracksName(trk1[i]).equals(ItemValue.getTracksName(
              trk2[j]))) {
            nl1 = ItemValue.getTracksPoint(trk1[i]);
            nl2 = ItemValue.getTracksPoint(trk2[j]);
            this.print("航迹:[" + ItemValue.getTracksName(trk1[i]) + "],航迹点为:" +
                       nl1.getLength());
            this.print("航迹:[" + ItemValue.getTracksName(trk2[j]) + "],航迹点为:" +
                       nl2.getLength());
          }
        }
      }
    }
  }
  public void setSavedDirectory(String path){
    this.directory = path;
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -