diff --git a/src/osm/jp/api/HttpPOST.java b/src/osm/jp/api/HttpPOST.java index dd9e572..28b8e82 100644 --- a/src/osm/jp/api/HttpPOST.java +++ b/src/osm/jp/api/HttpPOST.java @@ -537,8 +537,9 @@ BufferedReader reader = new BufferedReader(isr)) { String line; while ((line = reader.readLine()) != null) { - fw.append(line); + fw.write(line); } + fw.flush(); } } } finally { diff --git a/src/osm/jp/api/OsmExist.java b/src/osm/jp/api/OsmExist.java index 14c7395..c835c2b 100644 --- a/src/osm/jp/api/OsmExist.java +++ b/src/osm/jp/api/OsmExist.java @@ -133,7 +133,7 @@ StringBuilder sb = new StringBuilder(); for (Japan box : Japan.all2) { - String boxq = String.format("(%d,%d,%d,%d)", box.minLat, box.minLon, box.maxLat, box.maxLon); + String boxq = String.format("(%f,%f,%f,%f)", box.minLat, box.minLon, box.maxLat, box.maxLon); sb.append(String.format("(node(changed:\"%s\")%s;)->.a;\n", startDate, boxq)); sb.append(String.format("(node(newer:\"%s\")%s;)->.b;\n", startDate, boxq)); sb.append(String.format("(way(changed:\"%s\")%s;)->.c;\n", startDate, boxq)); diff --git a/test/osm/jp/coverage/OsmExistTest.java b/test/osm/jp/coverage/OsmExistTest.java index 8c7f184..f6d183d 100644 --- a/test/osm/jp/coverage/OsmExistTest.java +++ b/test/osm/jp/coverage/OsmExistTest.java @@ -7,6 +7,7 @@ import org.junit.BeforeClass; import org.junit.Test; import osm.jp.api.HttpPOST; +import osm.jp.coverage.fuel.OsmExist; public class OsmExistTest { @@ -58,4 +59,9 @@ } } + @Test + public void test01_main() throws Exception { + OsmExist.main(new String[0]); + } + } \ No newline at end of file