diff --git a/src/coverage_BUSSTOP.sh b/src/coverage_BUSSTOP.sh index 93f6281..7eb4d4d 100755 --- a/src/coverage_BUSSTOP.sh +++ b/src/coverage_BUSSTOP.sh @@ -1,3 +1,4 @@ +cd /home/yuu/Desktop/workspace/osmCoverageBin cp ../osmCoverage/dist/osmCoverage.jar . rm -r database mkdir database @@ -8,6 +9,8 @@ #java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.DbExistBusstop -drop java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.DbExistBusstop java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.Busstop + +java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.ToCartoCSV java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.ToPostgis java -cp .:osmCoverage.jar:hayashi_0225.jar:hsqldb_2.2.9.jar:postgresql-9.4.1212.jar osm.jp.coverage.busstop.Coverage coverage.busstop.csv java -cp .:osmCoverage.jar:hayashi_0225.jar:hsqldb_2.2.9.jar:postgresql-9.4.1212.jar osm.jp.coverage.busstop.Coverage coverage.busstop.json diff --git a/src/osm/jp/coverage/busstop/ToCartoCSV.java b/src/osm/jp/coverage/busstop/ToCartoCSV.java index 5ff07ab..6fa9f1e 100644 --- a/src/osm/jp/coverage/busstop/ToCartoCSV.java +++ b/src/osm/jp/coverage/busstop/ToCartoCSV.java @@ -38,18 +38,18 @@ try (BufferedWriter ow = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(csvFile), "UTF-8"))) { Connection con = DatabaseTool.openDb("postgis"); // CSV header - System.out.println("name,score,lon,lat"); - ow.write("name,score,lon,lat"); + System.out.println("score,lon,lat"); + ow.write("score,lon,lat"); PreparedStatement ps8 = con.prepareStatement("SELECT name,ST_X(ST_TRANSFORM(geom,4612)) as lon, ST_Y(ST_TRANSFORM(geom,4612)) as lat,fixed FROM t_busstop"); try (ResultSet rset8 = ps8.executeQuery()) { while (rset8.next()) { - String name = rset8.getString("name"); + //String name = rset8.getString("name"); Double lat = rset8.getDouble("lat"); Double lon = rset8.getDouble("lon"); int score = rset8.getInt("fixed"); String osm_node; - osm_node = "\""+ escapeStr(name) +"\",\""+ score +"\",\""+ Double.toString(lon) +"\",\""+ Double.toString(lat) +"\""; + osm_node = ""+ score +",\""+ Double.toString(lon) +"\",\""+ Double.toString(lat) +"\""; System.out.println(osm_node); ow.write(osm_node); ow.newLine();