diff --git a/src/coverage_FUEL.sh b/src/coverage_FUEL.sh index d246691..d460447 100755 --- a/src/coverage_FUEL.sh +++ b/src/coverage_FUEL.sh @@ -1,3 +1,5 @@ +cd /home/yuu/Desktop/workspace/osmCoverageBin +git checkout master cp ../osmCoverage/dist/osmCoverage.jar . rm -r database mkdir database @@ -6,10 +8,14 @@ java -cp .:osmCoverage.jar:hayashi_0225.jar:hsqldb_2.2.9.jar:postgresql-9.4.1212.jar osm.jp.coverage.fuel.Fuel java -cp .:osmCoverage.jar:hayashi_0225.jar:hsqldb_2.2.9.jar:postgresql-9.4.1212.jar osm.jp.coverage.fuel.ToPostgis java -cp .:osmCoverage.jar:hayashi_0225.jar:hsqldb_2.2.9.jar:postgresql-9.4.1212.jar osm.jp.coverage.fuel.ToCartoCSV +java -cp .:osmCoverage.jar:hayashi_0225.jar:hsqldb_2.2.9.jar:postgresql-9.4.1212.jar osm.jp.coverage.fuel.ToGeoJSON java -cp .:osmCoverage.jar:hayashi_0225.jar:hsqldb_2.2.9.jar:postgresql-9.4.1212.jar osm.jp.coverage.fuel.Coverage coverage.fuel.csv java -cp .:osmCoverage.jar:hayashi_0225.jar:hsqldb_2.2.9.jar:postgresql-9.4.1212.jar osm.jp.coverage.fuel.Coverage coverage.fuel.json +cp coverage.fuel.json GML_FUEL +cp coverage.fuel.csv GML_FUEL +cp fuel?.json GML_FUEL +rm coverage.fuel.* +git add * git commit -a -m "coverage fuel update $(date +%Y-%m-%d_%H:%M)" -cp coverage.fuel.json ../www-root/coverage -cd ../www-root -git add . -git commit -a -m "coverage fuel update $(date +%Y-%m-%d_%H:%M)" +git push gitbucket master + diff --git a/src/osm/jp/coverage/fuel/ToGeoJSON.java b/src/osm/jp/coverage/fuel/ToGeoJSON.java index fa7f32e..5e168f1 100644 --- a/src/osm/jp/coverage/fuel/ToGeoJSON.java +++ b/src/osm/jp/coverage/fuel/ToGeoJSON.java @@ -43,8 +43,7 @@ ow.newLine(); PreparedStatement ps8 = con.prepareStatement("SELECT row_to_json(feature) FROM (" - + "select 'Feature' As type, ST_AsGeoJSON(ST_Transform(t_fuel.geom,4326))::json As geometry, row_to_json((" - + "SELECT p FROM (SELECT t_fuel.idref, t_fuel.fixed) AS p)) AS properties From t_fuel "+ whereStr +" order by area,idref) As feature"); + + "select 'Feature' As type, ST_AsGeoJSON(ST_Transform(t_fuel.geom,4326))::json As geometry From t_fuel "+ whereStr +" order by area,idref) As feature"); try (ResultSet rset8 = ps8.executeQuery()) { boolean top = true; while (rset8.next()) {