uniteallwpt.java

来自「基于Java的地图数据管理软件。使用MySQL数据库管理系统。」· Java 代码 · 共 69 行

JAVA
69
字号
package net.aetherial.gis.our.auto.extend;

import net.aetherial.gis.our.FrameOur;
import net.aetherial.gis.our.auto.Auto;
import net.aetherial.gis.our.ToShape;
import java.io.File;
import net.aetherial.gis.surface.ItemValue;
import org.w3c.dom.Node;
import net.aetherial.gis.our.WipeWaypoint;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class UniteAllWPT  extends Auto{
  private String directory ="";
  private String shpName = "auto";
  public UniteAllWPT(FrameOur fo) {
    this.setFrameOur(fo);
  }
  public void getAllFile(){
    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.deleteAllTrack();
    this.showBetter(true);
    ToShape tf = new ToShape();
    tf.save(new File(this.directory+this.shpName+".gps"));
    this.setMemoryReset();
    this.msg("文件生成完毕!\r\n" + this.directory+this.shpName+".shp");

  }
  private void deleteAllTrack(){
    Node[] trks = ItemValue.getTracks();
    if (trks != null) {
      for (int i = 0; i < trks.length; i++) {
        ItemValue.removeTrack(trks[i]);
      }
    }
  }
  public void showBetter(boolean better){
    if(better){
        WipeWaypoint ww = new WipeWaypoint();
        ww.run4();
      }

  }
  public void setSavedDirectory(String path){
    this.directory = path;
  }

  public void setShpName(String shpName) {
    this.shpName = shpName;
  }

}

⌨️ 快捷键说明

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