diff --git a/src/osm/jp/coverage/busstop/Busstop.java b/src/osm/jp/coverage/busstop/Busstop.java index bb2ba6d..120a88e 100644 --- a/src/osm/jp/coverage/busstop/Busstop.java +++ b/src/osm/jp/coverage/busstop/Busstop.java @@ -64,7 +64,7 @@ // HSQLディレクトリがなければ作る File dbdir = new File("database"); if (!dbdir.isDirectory()) { - dbdir.mkdir(); + dbdir.mkdir(); } Connection con = DatabaseTool.openDb("database"); @@ -76,9 +76,9 @@ * --> 'existing.xml' */ if (Busstop.update && !Busstop.noget) { - Busstop.initDb(con); - File existingFile = new File(HttpPOST.EXIST_FILE); - getJapanCapabilities(con, existingFile); + Busstop.initDb(con); + File existingFile = new File(HttpPOST.EXIST_FILE); + getJapanCapabilities(con, existingFile); } /** @@ -88,11 +88,11 @@ File dir = new File("."); File[] files = dir.listFiles(); for (File iDir : files) { - if (checkGMLdir(iDir)) { - // GMLディレクトリを処理する - new Busstop(con, iDir); - fcounter++; - } + if (checkGMLdir(iDir)) { + // GMLディレクトリを処理する + new Busstop(con, iDir); + fcounter++; + } } System.out.println("["+ fcounter +"]つのファイルをインポートしました。"); } @@ -102,7 +102,7 @@ } public static void getJapanCapabilities(Connection con, File oFile) throws MalformedURLException, ProtocolException, IOException, ClassNotFoundException, SQLException, ParserConfigurationException, SAXException { - for (Japan all1 : all) { + for (Japan all1 : Japan.all) { HttpPOST.getCapabilities("highway", "bus_stop", all1.minLat, all1.maxLat, all1.minLon, all1.maxLon); readExistingFile(con); HttpPOST.getCapabilities("highway", "disused:bus_stop", all1.minLat, all1.maxLat, all1.minLon, all1.maxLon); @@ -144,8 +144,6 @@ conPost = DatabaseTool.openDb("postgis"); } - - File[] files = gmldir.listFiles(); try { for (File iFile : files) { @@ -890,140 +888,4 @@ public static final String GML_DIR_PREFIX = "P11-10_"; public static final String GML_DIR_PRIFIX = "_GML"; - - public static Japan[] all = new Japan[] { - new Japan(140D, 45D, 1D), - new Japan(141D, 45D, 1D), - new Japan(142D, 45D, 1D), - - new Japan(140D, 44D, 1D), - new Japan(141D, 44D, 1D), - new Japan(142D, 44D, 1D), - new Japan(143D, 44D, 1D), - new Japan(144D, 44D, 1D), - new Japan(145D, 44D, 1D), - - new Japan(140D, 43D, 1D), - new Japan(141D, 43D, 1D), - new Japan(142D, 43D, 1D), - new Japan(143D, 43D, 1D), - new Japan(144D, 43D, 1D), - new Japan(145D, 43D, 1D), - - new Japan(139D, 42D, 1D), - new Japan(140D, 42D, 1D), - new Japan(141D, 42D, 1D), - new Japan(142D, 42D, 1D), - new Japan(143D, 42D, 1D), - new Japan(144D, 42D, 1D), - new Japan(145D, 42D, 1D), - - new Japan(139D, 41D, 1D), - new Japan(140D, 41D, 1D), - new Japan(141D, 41D, 1D), - - new Japan(139D, 40D, 1D), - new Japan(140D, 40D, 1D), - new Japan(141D, 40D, 1D), - - new Japan(139D, 39D, 1D), - new Japan(140D, 39D, 1D), - new Japan(141D, 39D, 1D), - new Japan(142D, 39D, 1D), - - new Japan(138D, 38D, 1D), - new Japan(139D, 38D, 1D), - new Japan(140D, 38D, 1D), - new Japan(141D, 38D, 1D), - - new Japan(136D, 37D, 1D), - new Japan(137D, 37D, 1D), - new Japan(138D, 37D, 1D), - new Japan(139D, 37D, 1D), - new Japan(140D, 37D, 1D), - new Japan(141D, 37D, 1D), - - new Japan(132D, 36D, 1D), - new Japan(133D, 36D, 1D), - new Japan(135D, 36D, 1D), - new Japan(136D, 36D, 1D), - new Japan(137D, 36D, 1D), - new Japan(138D, 36D, 1D), - new Japan(139D, 36D, 1D), - new Japan(140D, 36D, 1D), - - new Japan(132D, 35D, 1D), - new Japan(133D, 35D, 1D), - new Japan(134D, 35D, 1D), - new Japan(135D, 35D, 1D), - new Japan(136D, 35D, 1D), - new Japan(137D, 35D, 1D), - new Japan(138D, 35D, 1D), - new Japan(139D, 35D, 1D), - new Japan(140D, 35D, 1D), - - new Japan(129D, 34D, 1D), - new Japan(130D, 34D, 1D), - new Japan(131D, 34D, 1D), - new Japan(132D, 34D, 1D), - new Japan(133D, 34D, 1D), - new Japan(134D, 34D, 1D), - new Japan(135D, 34D, 1D), - new Japan(136D, 34D, 1D), - new Japan(137D, 34D, 1D), - new Japan(138D, 34D, 1D), - new Japan(139D, 34D, 1D), - - new Japan(129D, 33D, 1D), - new Japan(130D, 33D, 1D), - new Japan(131D, 33D, 1D), - new Japan(132D, 33D, 1D), - new Japan(133D, 33D, 1D), - new Japan(134D, 33D, 1D), - new Japan(135D, 33D, 1D), - new Japan(136D, 33D, 1D), - new Japan(139D, 33D, 1D), - - new Japan(128D, 32D, 1D), - new Japan(129D, 32D, 1D), - new Japan(130D, 32D, 1D), - new Japan(131D, 32D, 1D), - new Japan(132D, 32D, 1D), - new Japan(133D, 32D, 1D), - new Japan(139D, 32D, 1D), - - new Japan(129D, 31D, 1D), - new Japan(130D, 31D, 1D), - new Japan(131D, 31D, 1D), - - new Japan(129D, 30D, 1D), - new Japan(130D, 30D, 1D), - new Japan(131D, 30D, 1D), - - new Japan(128D, 29D, 1D), - new Japan(129D, 29D, 1D), - - new Japan(128D, 28D, 1D), - new Japan(129D, 28D, 1D), - - new Japan(127D, 27D, 1D), - new Japan(128D, 27D, 1D), - new Japan(129D, 27D, 1D), - - new Japan(126D, 26D, 1D), - new Japan(127D, 26D, 1D), - new Japan(128D, 26D, 1D), - new Japan(129D, 26D, 1D), - - new Japan(125D, 25D, 1D), - - new Japan(123D, 24D, 1D), - new Japan(124D, 24D, 1D), - new Japan(125D, 24D, 1D), - - // 小笠原諸島 - new Japan(142D, 27D, 1D), - new Japan(142D, 26D, 1D) - }; - } \ No newline at end of file