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

📄 jingweidutogps.java

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

import org.w3c.dom.Node;
import net.aetherial.gis.jiaotongbu.input.type.Qiaoliang;
import net.aetherial.gis.surface.ItemValue;
import java.util.Vector;
import org.w3c.dom.Node;
import net.aetherial.gis.jiaotongbu.input.publicuse.Permanence;
import net.aetherial.gis.publicuse.WptTrackDistance;
import net.aetherial.gis.our.auto.check.repeattrk.TrackRectangle;
import net.aetherial.gis.jiaotongbu.input.publicuse.QiaoliangToGPS;
import net.aetherial.gis.publicuse.wpt.getWptZhuanghao;
import java.text.DecimalFormat;
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 JingweiduToGPS {
  Node hebingTrack = null;
  java.text.DecimalFormat format = null;
  AnalyseKuaxian analyse = null;
  String fileNumber = "%%%%";
  public JingweiduToGPS() {
  }

  public void createAllLeftQiaoliang(){
    Qiaoliang ql = null;
    for (int i = 0; i < Permanence.heduidata_QL.size(); i++) {
      ql = (Qiaoliang)Permanence.heduidata_QL.get(i);
//      System.out.println(ql);
//      System.out.println(ql.getNumber().toUpperCase().indexOf(this.fileNumber));
//      System.out.println((!ql.isNianBao()));
      if (ql.getNumber().toUpperCase().indexOf(this.fileNumber) != -1 && (!ql.isNianBao())) {
//        System.out.println(ql);
        this.createQiaoliang(ql);
        i--;
      }
    }
//    if (fileNumber.indexOf("X065") != -1) {
////         for (int i = 0; i < nianbaoQiaoliangs.length; i++) {
////           System.out.println(nianbaoQiaoliangs[i].toString());
////         }
////
//         System.exit(0);
//       }

  }
  private void createQiaoliang(Qiaoliang ql) {
    Node newWpt = null;
    try {
      double x = Double.parseDouble(ql.getLon());
      double y = Double.parseDouble(ql.getLat());
      newWpt = ItemValue.createNewWaypoint(ql.getName(), ql.getLon(), ql.getLat(),
                                           "0");
    }
    catch (NumberFormatException ex) {
    }

    if (newWpt == null) {
      ql.setBeizhu("经纬度不是有效数字.");
      Permanence.addLog("[添加坐标失败]经纬度不是有效数字.");
      Permanence.error_QL.add(ql);
      Permanence.heduidata_QL.removeElement(ql);
      return;
    }
    else {
      double dis = WptTrackDistance.getWptToTrackDis(newWpt, this.hebingTrack);
      if (dis > TrackRectangle.NEAR_DISTANCE * (25.0 / 20.0)) {
        ql.setBeizhu("坐标离路线范围太远.");
        Permanence.addLog("[添加坐标失败]坐标离路线范围太远.");
        Permanence.error_QL.add(ql);
        Permanence.heduidata_QL.removeElement(ql);
        ItemValue.removeWaypoint(newWpt);
        return;
      }

      getWptZhuanghao wptZhuanghao = null;
      String newzhuaanghaoTemp = "";
      wptZhuanghao = new getWptZhuanghao();
      wptZhuanghao.setTrack(hebingTrack);
      wptZhuanghao.setWaypoint(newWpt);
      newzhuaanghaoTemp = format.format(analyse.getZongtiZhuanghao(Double.
          parseDouble(wptZhuanghao.getWaypointZhuanghao())));
//        analyse.getZongtiZhuanghao(Double.parseDouble(wptZhuanghao.getWaypointZhuanghao()));
      ql.setZhuanghao(newzhuaanghaoTemp);
      ItemValue.setWaypointKP(newWpt,WptType.W3QiaoLiang);
      QiaoliangToGPS.setWaypointQiaoliangValue(newWpt, ql);
      Permanence.addLog("[添加成功]\t桥梁:" + ql);
      Permanence.heduidata_QL.removeElement(ql);
    }

//    newWpt
  }

  public void setHebingTrack(Node hebingTrack) {
    this.hebingTrack = hebingTrack;
  }

  public void setAnalyse(AnalyseKuaxian analyse) {
    this.analyse = analyse;
  }

  public void setFormat(DecimalFormat format) {
    this.format = format;
  }

  public void setFileNumber(String fileNumber) {
    this.fileNumber = fileNumber;
  }
}

⌨️ 快捷键说明

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