diff --git a/src/osm/jp/coverage/busstop/ToPostgis.java b/src/osm/jp/coverage/busstop/ToPostgis.java index f73c37e..ca0c4f9 100644 --- a/src/osm/jp/coverage/busstop/ToPostgis.java +++ b/src/osm/jp/coverage/busstop/ToPostgis.java @@ -89,9 +89,8 @@ fixed = 1; } String geom = "ST_GeomFromText('POINT("+ BigDecimal.valueOf(lon).toPlainString() +" "+ BigDecimal.valueOf(lat).toPlainString() +")', 4612)"; - String sqlStr = "INSERT INTO t_busstop (gmlid,name,fixed,area,geom) VALUES ('"+ gmlid +"','"+ name +"',"+ fixed +","+ area +","+ geom +")"; - System.out.println(sqlStr); - sqlStr = "INSERT INTO t_busstop (gmlid,name,fixed,area,geom) VALUES (?,?,?,?,"+ geom +")"; + String sqlStr = "INSERT INTO t_busstop (gmlid,name,fixed,area,geom) VALUES (?,?,?,?,"+ geom +")"; + System.out.println(sqlStr +" ["+ gmlid +", '"+ name +"', "+ fixed +", "+ area +"]"); try (PreparedStatement ps = conPost.prepareStatement(sqlStr)) { ps.setString(1, gmlid); ps.setString(2, name); diff --git a/src/osm/jp/coverage/test/ToPostgis.java b/src/osm/jp/coverage/test/ToPostgis.java index fb77303..fd3f6c7 100644 --- a/src/osm/jp/coverage/test/ToPostgis.java +++ b/src/osm/jp/coverage/test/ToPostgis.java @@ -1,6 +1,5 @@ package osm.jp.coverage.test; -import osm.jp.coverage.busstop.*; import java.io.FileNotFoundException; import java.io.IOException; import java.math.BigDecimal; @@ -34,7 +33,6 @@ conPost = DatabaseTool.openDb("postgis"); transportNew(conHsql, conPost); - } finally { if (conHsql != null) {