📄 qiaoliang.java
字号:
package net.aetherial.gis.jiaotongbu.output.type;
import org.w3c.dom.Node;
import net.aetherial.gis.surface.ItemValue;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class Qiaoliang
extends WptToJTB {
protected String kongshu = "";
protected String kuadu = "";
protected String bianhao = "";
protected String zhuanghao = "";
protected String quanchang = "";
protected String cailiao = "";
protected String hezai = "";
protected String shijian = "";
protected String weiqiao = "";
public Qiaoliang(Node wpt) {
super(wpt);
}
protected String[] getQiaoliangArray(Node wpt) {
return ItemValue.getWaypointQiaoliang(wpt);
}
public static final String getHead() {
return "编号,所在乡镇,桥梁名称,所在路线名称,经度,纬度,高程,按孔数分类,桥梁跨度,桥梁编码,建成时间,桥梁设计荷载,按建筑材料和使用年限分类,是否危桥,桥梁位置,备注\r\n";
}
public void setValue(){
super.setValue();
String[] ql = this.getQiaoliangArray(this.wpt);
if (ql != null) {
this.kongshu = ql[1];
this.kuadu = ql[2];
this.bianhao = ql[3].trim();
this.shijian = ql[4].trim();
this.zhuanghao = ql[5].trim();
this.quanchang = ql[6].trim();
this.hezai = ql[7].trim();
this.cailiao = ql[8].trim();
this.weiqiao = ql[9].trim();
}
}
/**
* 判断GPS数据是否已经被填满数据
*/
public boolean isGPSDataHaveFillValue(){
// System.out.println(this.toString());
if ((!bianhao.trim().equals(""))||(!shijian.trim().equals(""))||(!zhuanghao.trim().equals(""))||(!quanchang.trim().equals(""))) {
return true;
}else{
return false;
}
}
public String getKuajinfenlei() {
if (this.kuadu.equals("")) {
this.kuadu = "0";
}
double temp = 0;
try {
temp = Double.parseDouble(this.kuadu.trim());
}
catch (NumberFormatException ex) {
}
if (temp > 1000) {
return "特大桥";
}
else if (1000 >= temp && temp > 100) {
return "大桥";
}
else if (100 >= temp && temp > 30) {
return "中桥";
}
else {
return "小桥";
}
}
public String getValue(){
return super.getValue()+",\"" + this.kongshu + "\",\"" + this.kuadu + "\"";
}
public String getARecord() {
String[] ql = this.getQiaoliangArray(this.wpt);
if (ql != null) {
String ntemp = "";
for (int i = 0; i < ql.length; i++) {
if (i > 0) {
ntemp = ntemp + ",\"" + ql[i] + "\"";
}
}
return super.getARecord() + ntemp;
}
else {
return super.getARecord();
}
}
public String toString(){
String n = "";
n = n +this.kongshu + "\t";
n = n +this.quanchang + "\t";
n = n +this.bianhao + "\t";
n = n +this.kuadu + "\t";
n = n +this.cailiao + "\t";
n = n +this.hezai + "\t";
n = n +this.weiqiao + "\t";
return n;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -