");
- hw.write(""+ type +" | ");
- hw.write(""+ corp +" | ");
- hw.write(""+ course +" | ");
- hw.write(""+ gpxFile.getName() +" | ");
- hw.write(""+ osmSample.getName() +" | ");
- hw.newLine();
-
- //--------------------------------------------
- // Wiki見出し2: 運行会社
- //------------
- if (!maeCorp.equals(corp)) {
- if (firstCorp == false) {
- ww.write("|}");
- ww.newLine();
- ww.newLine();
- }
- firstCorp = false;
-
- ww.write("=== "+ corp +" ===");
- ww.newLine();
- ww.newLine();
-
- ww.write(":{{JA:Tag|network||"+ corp +"}}");
- ww.newLine();
- ww.write(":{{JA:Tag|operator||"+ corp +"}}");
- ww.newLine();
- ww.newLine();
-
- ww.write("{| class=\"wikitable sortable\" style=\"table-layout: fixed; width: 100%\"");
- ww.newLine();
- ww.write("!style=\"width: 100px\"| ref");
- ww.newLine();
- ww.write("!class=\"unsortable\" style=\"width: 152px\"| 編集状況(マスタ)");
- ww.newLine();
- ww.write("!class=\"unsortable\" style=\"width: 152px\"| 編集状況(往路)");
- ww.newLine();
- ww.write("!class=\"unsortable\" style=\"width: 152px\"| 編集状況(復路)");
- ww.newLine();
- ww.write("!class=\"unsortable\"| 備考");
- ww.newLine();
-
- maeCorp = new String(corp);
- }
-
- // Wiki
- ww.write("|-");
- ww.newLine();
- ww.write("| "+ course +" "); // ref
- ww.write("|| {{State Route|r=0}} {{relation|0|tools=no}} "); // 編集状況 (マスタ)
- ww.write("|| {{State Route|r=0|h=0}} {{relation|0|tools=no}} "); // 編集状況 (往路)
- ww.write("|| {{State Route|r=0|h=0}} {{relation|0|tools=no}} "); // 編集状況 (復路)
- ww.write("|| "); // 備考
- ww.newLine();
-
-
- // OSM file header
- ow = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(osmFile), "UTF-8"));
- ow.write("");
- ow.newLine();
- ow.write("");
- ow.newLine();
-
- // GPX file header
- gw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(gpxFile), "UTF-8"));
- gw.write("");
- gw.newLine();
- gw.write("");
- gw.newLine();
-
- double maxLat = -180.0;
- double minLat = 180.0;
- double maxLon = -180.0;
- double minLon = 180.0;
-
- ps9.setInt(1, code);
- ResultSet rset9 = ps9.executeQuery();
- while (rset9.next()) {
- String idref = rset9.getString(1);
-
- ps8.setString(1, idref);
- ResultSet rset8 = ps8.executeQuery();
- if (rset8.next()) {
- stopCount++;
- String name = rset8.getString(1);
- Double lat = rset8.getDouble(2);
- Double lon = rset8.getDouble(3);
- int fixed = rset8.getInt(4);
-
- if (lat > maxLat) {
- maxLat = lat;
- }
- if (lon > maxLon) {
- maxLon = lon;
- }
- if (lat < minLat) {
- minLat = lat;
- }
- if (lon < minLon) {
- minLon = lon;
- }
-
- System.out.println("\tway point = "+ idref +", lat="+ lat +", lon="+ lon +", name="+ name);
- fixedCount += fixed;
- if (fixed == 0) {
- unfixedCount++;
-
- // OSM node
- String osm_node = nodeBusstop(con, idref, name, lat, lon, timeStampStr);
- ow.write(osm_node);
- ow.newLine();
-
- // TEXT node
- //File txtFile = new File(dir, iCode + idref +".txt");
- //BufferedWriter gw2 = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(txtFile), "UTF-8"));
- //gw2.write(osm_node);
- //gw2.newLine();
- //gw2.close();
-
- // GPX waypoint
- gw.write("\n");
- gw.write(" \n");
- gw.write(" \n");
- //gw.write(" "+ idref +"\n");
- gw.write("\n");
- gw.newLine();
- }
- }
- rset8.close();
- }
- rset9.close();
-
- // INDEX file
- hw.write(""+ stopCount +" | ");
- hw.write(""+ unfixedCount +" | ");
- hw.write(""+ fixedCount +" | ");
- hw.write("
");
- hw.newLine();
-
- // OSM file header
- BufferedWriter ow2 = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(osmSample), "UTF-8"));
- ow2.write("");
- ow2.newLine();
- ow2.write("