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

📄 runall.java

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

import org.w3c.dom.Node;
import java.util.Vector;
import java.util.Hashtable;
import java.util.Enumeration;
import net.aetherial.gis.surface.ItemValue;
import org.w3c.dom.NodeList;
import net.aetherial.gis.our.FrameOur;
import net.aetherial.gis.garmin.GarminGMLDoc;
import org.w3c.dom.Element;
import java.io.File;
import net.aetherial.gis.output.toLd.OpenDirectory;
import net.aetherial.gis.jiaotongbu.input.publicuse.ReFangxiang;
import net.aetherial.gis.jiaotongbu.input.jxl.ReadFangxiang;
import net.aetherial.gis.publicuse.track.ConcatenatedTrack;
import net.aetherial.gis.jiaotongbu.input.publicuse.Permanence;
import net.aetherial.gis.surface.CreateFile;
/**
 * <p>标题: 农村公路数据采集与核对工具</p>
 *
 * <p>描述: </p>
 *
 * <p>版权: Copyright (c) 2006</p>
 *
 * <p>公司: 安徽省通途信息技术公司</p>
 *
 * @author 王爱国
 * @version 1.0
 */
public class RunAll {
  FrameOur fo = null;
  String inputPath = "",title = "";;

  public RunAll() {
  }

  public String getAllFile(){
    String n = "";
    OpenDirectory od = new OpenDirectory();
    od.setGradeStr("国道|省道|县道|乡道|村道");
    File[] gpsFiles = od.getOpenFile(this.inputPath);
    for (int i = 0;gpsFiles != null &&  i < gpsFiles.length; i++) {
      n += this.getAFile(gpsFiles[i]);
    }
    return n;
  }

  public String getAFile(File gpsFile){
    String n = "";
    this.fo.openFile(gpsFile);
    Node[] trks = ItemValue.getTracks();

    QiZhiDianName names = new QiZhiDianName();
    names.setWpts(ItemValue.getWaypoint());
    for (int i = 0;trks != null &&  i < trks.length; i++) {
      n += title+"\t";
      n += ItemValue.getTracksName(trks[i])+"\t";
      n += ItemValue.getTracksNumber(trks[i])+"\t";
      n += names.getQidianName(trks[i])+"\t";
      n += names.getZhidianName(trks[i])+"\t";
      n += "\r\n";
    }
    this.fo.reset();
    return n;
  }

  public void setFo(FrameOur fo) {
    this.fo = fo;
  }

  public void setInputPath(String inputPath) {
    this.inputPath = inputPath;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  public static String createLogFile(String content,File f) {
    CreateFile cf = new CreateFile(f);
    cf.memoryToFile(content);
    return f.getAbsolutePath();
  }

  public static void main(String args[]){
    String n = "";
    RunAll ra = new RunAll();
    FrameOur fo = new FrameOur();
    ItemValue.setShowDialogMessage(false);
    ra.setFo(fo);
//    ra.setInputPath("E:\\核对工作\\数据\\操作数据\\巢湖市\\庐江县");
//    n += ra.getAllFile();
    File sheng = new File("E:\\农村公路通达情况调查\\数据\\报省数据\\通达情况专项调查\\安徽省");
    File[] shi = sheng.listFiles();
    File[] xians = null;
    for (int i = 0; i < shi.length; i++) {
      if (shi[i].getName().indexOf("汇总") == -1 && shi[i].getName().indexOf("svn") == -1) {
        xians = shi[i].listFiles();
        for (int j = 0; xians != null && j < xians.length; j++) {
          if (xians[j].getName().indexOf("汇总") == -1 && xians[j].getName().indexOf("svn") == -1) {
            ra.setInputPath(xians[j].getAbsolutePath());
            ra.setTitle(shi[i].getName() + "\t" + xians[j].getName());
            n += ra.getAllFile();
//            break;
          }

        }
      }
    }

    ra.createLogFile(n,new File("E:\\test\\15\\Name.txt"));


  }
}

⌨️ 快捷键说明

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