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

📄 xyzoutput.java

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JAVA
字号:
package net.aetherial.gis.our.output.txt;

import javax.swing.*;
import java.io.File;
import net.aetherial.gis.excel.ExcelFilter;
import net.aetherial.gis.surface.ItemValue;
import org.w3c.dom.Node;
import net.aetherial.gis.dataType.ElementToWpt;
import net.aetherial.gis.surface.CreateFile;
import net.aetherial.gis.dataType.ElementToTrk;
import org.w3c.dom.NodeList;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class XYZOutput {
  public XYZOutput() {
  }

  private String scanAllPoints() {
    String pointsN = "", ln = "\r\n";

    Node[] trks = ItemValue.getTracks();
    Node[] wpts = null;
    if (trks == null) {
      return "";
    }
    NodeList nl = null;
    for (int i = 0; i < trks.length; i++) {
      pointsN = pointsN + ItemValue.getTracksName(trks[i]) + ln;
      wpts = ItemValue.getTracksWaypoint(trks[i]);
      nl = ItemValue.getTracksPoint(trks[i]);
      if (wpts != null) {
        for (int j = 0; j < wpts.length; j++) {
          pointsN = pointsN + ItemValue.getWaypointName(wpts[j]) + "," +
              ItemValue.getWaypointX(wpts[j]) + "," +
              ItemValue.getWaypointY(wpts[j]) + "," +
              ItemValue.getWaypointZ(wpts[j]) + ln;
        }
      }
      for (int j = nl.getLength() -1; j >= 0; j--) {
        pointsN = pointsN + (j + 1) + "," + ItemValue.getTracksPointX(nl.item(j)) +
            "," + ItemValue.getTracksPointY(nl.item(j)) + "," +
            ItemValue.getTracksPointZ(nl.item(j)) + ln;
      }

    }
    return pointsN;
  }

  public void output(String filepath) {
    CreateFile cfWpt = new CreateFile(new File(filepath));
    cfWpt.setEncode("GB2312");
    cfWpt.memoryToFile(this.scanAllPoints());
  }
}

⌨️ 快捷键说明

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