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

📄 tditem.java

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

import org.w3c.dom.Node;
import net.aetherial.gis.publicuse.TrackOper;
import net.aetherial.gis.our.auto.check.repeattrk.TrackRectangle;
import net.aetherial.gis.surface.ItemValue;
import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.gpsdata.bianma.RoadBianma;
/**
 * <p>Title: </p>
 *
 * <p>Description: 某一条通达路线.<br>可以得到通达路线的路线、位置、距离等</p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class TDItem {
  /**
   * 如果属于乡镇通达,则为true
   * 如果属于建制村通达,则为false
   */
  private boolean isXiangzhen = true;

  protected String trk = null;
  protected double lon,lat;

  /**
   * 学校的经纬度
   */
  protected double xxLon,xxLat;

  protected int posLink = 1;
  protected int posTo = 2;
  /**
   * 乡镇是穿越,建制村是通至小学
   */
  protected int posPass = 3;
  /**
   * 乡镇是至其他位置,建制村是穿越
   */
  protected int posToOther = 4;
  protected int posXiaoXue = 3;

  protected double distance;
  public TDItem(String trk) {
    this.trk = trk;
  }

  private void setPositionDifine(){
    if (this.isXiangzhen == false) {
      this.posPass = 4;
      this.posToOther = 5;
    }
  }
  /**
   * 当建制村使用的时候,一定要调用此方法
   */
  protected void setToJianzhicun(){
   this.isXiangzhen = false;
   this.setPositionDifine();
  }

  /**
   * 设置乡镇、或者建制村的点
   */
   public void setPoint(double longitude,double latitude){
     this.lon = longitude;
     this.lat = latitude;
   }

   /**
    * 设置学校的经纬度
    */
   public void setXuexiao(double longitude,double latitude){
     this.xxLon = longitude;
     this.xxLat = latitude;
   }

   /**
    * 得到通达位置
    */
   public int getTongDaPosition(){
     return -1;
   }

   /**
    * 通达路线是否与内部街道相连
    */
   public int getIsLinkWithStreet(){
     return 1;
   }
   /**
   * 取 @TDNumber 通达路线编码 的值
   */
  public String getTDNumber() {

    return (String)ItemValue.numberedTracks.get(this.trk);//RoadBianma.getGPSNumber(this.trk);
  }

  /**
   * 取 @TDName 通达路线名称 的值
   */
  public String getTDName() {
    return trk;//ItemValue.getTracksName(this.trk);
  }

  /**
   * 取 @TDSiteName 其他位置名称 的值
   */
  public String getTDOtherSiteName() {
    return "";
  }

  /**
   * 取 @TDDis 乡镇政府距通达路线的里程 的值
   * 单位为公里
   */
  public String getTDDis() {
    return (ItemValue.calculateDistanceWithDegreeDis(TrackOper.getDisOfTracksWithPoint(this.lon,this.lat,this.trk))/1000) + "";
  }

  public String toString(){
    return this.getTDNumber() + "\t" + this.getTDName() + "\t" + this.getTongDaPosition() + "\t" +this.getTDOtherSiteName() + "\t" + this.getIsLinkWithStreet() + "\t" + this.getTDDis();
  }

}

⌨️ 快捷键说明

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