diff --git a/src/osm/jp/coverage/busstop/DbExistBusstop.java b/src/osm/jp/coverage/busstop/DbExistBusstop.java index 9d1578b..df1cbf3 100644 --- a/src/osm/jp/coverage/busstop/DbExistBusstop.java +++ b/src/osm/jp/coverage/busstop/DbExistBusstop.java @@ -87,6 +87,16 @@ // NAMEなし → 1ポイント // FIXMEあり → 1ポイント readExisting(conHsql, null, POINT_NO_NAME | POINT_FIXME); + readExistingSub(conHsql, "disused:highway", "bus_stop", POINT_NO); + readExistingSub(conHsql, "abandoned:highway", "bus_stop", POINT_NO); + readExistingSub(conHsql, "removed:highway", "bus_stop", POINT_NO); + readExistingSub(conHsql, "no:highway", "bus_stop", POINT_NO); + + readExistingSub(conHsql, "public_transport", "platform", POINT_BUS_NO | POINT_NO_NAME | POINT_FIXME); + readExistingSub(conHsql, "disused:public_transport", "platform", POINT_BUS_NO); + readExistingSub(conHsql, "abandoned:public_transport", "platform", POINT_BUS_NO); + readExistingSub(conHsql, "removed:public_transport", "platform", POINT_BUS_NO); + readExistingSub(conHsql, "no:public_transport", "platform", POINT_BUS_NO); } // ノード: 厚木ナイロン (1995040609) 場所: 35.4433312, 139.3932098 public_transport=stop_position,bus=yes diff --git a/src/osmCoverage.style b/src/osmCoverage.style index 2a99149..cdb166c 100644 --- a/src/osmCoverage.style +++ b/src/osmCoverage.style @@ -118,6 +118,12 @@ node,way generator:source text linear node,way harbour text polygon node,way highway text linear +node,way abandoned:highway text linear +node,way demolished:highway text linear +node,way disused:highway text linear +node,way removed:highway text linear +node,way historic:highway text linear +node,way no:highway text linear node,way historic text polygon node,way horse text linear node,way intermittent text linear @@ -139,6 +145,10 @@ node,way power text polygon node,way power_source text linear node,way public_transport text polygon +node,way disused:public_transport text polygon +node,way abandoned:public_transport text polygon +node,way removed:public_transport text polygon +node,way no:public_transport text polygon node,way railway text linear node,way ref text linear node,way religion text linear diff --git a/test/osm/jp/coverage/busstop/AllTest.java b/test/osm/jp/coverage/busstop/AllTest.java index 820e04a..0cc67ff 100644 --- a/test/osm/jp/coverage/busstop/AllTest.java +++ b/test/osm/jp/coverage/busstop/AllTest.java @@ -1,8 +1,3 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ package osm.jp.coverage.busstop; import org.junit.After; diff --git a/test/osm/jp/coverage/busstop/BusstopTest.java b/test/osm/jp/coverage/busstop/BusstopTest.java index ac5bdc7..acbf41e 100644 --- a/test/osm/jp/coverage/busstop/BusstopTest.java +++ b/test/osm/jp/coverage/busstop/BusstopTest.java @@ -9,14 +9,18 @@ import java.text.MessageFormat; import java.util.logging.Level; import java.util.logging.Logger; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.TransformerException; import jp.co.areaweb.tools.database.DatabaseTool; import static org.hamcrest.CoreMatchers.is; import org.junit.*; import static org.junit.Assert.*; +import org.xml.sax.SAXException; import osm.jp.api.HttpPOST; import osm.jp.api.Japan; import osm.jp.api.RectArea; import static osm.jp.coverage.busstop.Busstop.NEER; +import osm.jp.coverage.fuel.Fuel; /** * @@ -32,12 +36,23 @@ } @Test + public void test00_Fuel_main() { + try { + String[] args = new String[0]; + Fuel.main(args); + } + catch (IOException | ClassNotFoundException | SQLException | ParserConfigurationException | TransformerException | SAXException ex) { + fail(ex.toString()); + } + } + + @Test public void test01_dataread() { Connection hsqldb = null; try { hsqldb = DatabaseTool.openDb("database"); - - PreparedStatement ps1 = hsqldb.prepareStatement("SELECT gmlid,lat,lon,fixed,fixed1,area,name FROM bus_stop WHERE (lat > '34.69161765717579') and (lat < '34.697025680375795') and (lon > '135.79486712544522') and (lon < '135.80144696784524')"); + String sql = "SELECT gmlid,lat,lon,fixed,fixed1,area,name FROM "+ DbBusstop.TABLE_NAME +" WHERE (lat > '34.69161765717579') and (lat < '34.697025680375795') and (lon > '135.79486712544522') and (lon < '135.80144696784524')"; + PreparedStatement ps1 = hsqldb.prepareStatement(sql); try (ResultSet rset1 = ps1.executeQuery()) { while (rset1.next()) { System.out.println(rset1.getString("gmlid")); diff --git a/test/osm/jp/coverage/fuel/FuelTest.java b/test/osm/jp/coverage/fuel/FuelTest.java index c2b05ad..2a08265 100644 --- a/test/osm/jp/coverage/fuel/FuelTest.java +++ b/test/osm/jp/coverage/fuel/FuelTest.java @@ -7,14 +7,12 @@ import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.TransformerException; import jp.co.areaweb.tools.database.DatabaseTool; import org.junit.*; import static org.junit.Assert.*; import org.junit.runners.MethodSorters; -import org.xml.sax.SAXException; import osm.jp.api.HttpPOST; +import osm.jp.coverage.busstop.Busstop; @FixMethodOrder (MethodSorters.NAME_ASCENDING) public class FuelTest { @@ -28,17 +26,10 @@ @Test public void test00_Fuel_main() { - try { - String[] args = new String[0]; - Fuel.main(args); - } - catch (IOException | ClassNotFoundException | SQLException | ParserConfigurationException | TransformerException | SAXException ex) { - fail(ex.toString()); - } + String[] args = new String[0]; + Busstop.main(args); } - - /** * OSM: removed:amenity=fuel 35.4305614, 139.3662339 * GML: 14, n00375 @@ -117,6 +108,7 @@ } } catch(Exception e){ + e.printStackTrace(); fail(e.toString()); } finally { DatabaseTool.closeDb(hsqldb);