diff --git a/doc/osmCoverage.md b/doc/osmCoverage.md index bc15e7a..6fe0dfc 100644 --- a/doc/osmCoverage.md +++ b/doc/osmCoverage.md @@ -32,6 +32,39 @@ 3. 生成された「統計データ」と「ベクタタイル」を GitHub に プッシュ(push) する 4. ついでに、`Raspi3`にある「公開用のPostGIS」にも「データ」をコピーする +## 処理 + +### バス停留所データ + +#### 規準データ + +国土交通省国土政策局「国土数値情報 バス停留所データ 平成22年」 + +#### 対象ノード + +国土数値情報のバス停位置を中心とする、300m四方以内に存在するOSMのバス停ノードの評価点の合計を数える。 +また、nameが同一ならば600m四方以内にまでのノードも評価点に加える。 + +| Type | tag | score,NO_NAME,FIXED,NO_BUS | removed | +|------|-------------------------------------|----------|-------| +| node | highway=bus_stop | 50,1,1,- | false | +| node | amenity=bus_station | 50,1,1,- | false | +| area | amenity=bus_station | 50,1,1,- | false | +| node | public_transport=platform | 50,1,1,1 | false | +| node | disused:highway=bus_stop | 50,-,-,- | true | +| node | abandoned:highway=bus_stop | 50,-,-,- | true | +| node | removed:highway=bus_stop | 50,-,-,- | true | +| node | no:highway=bus_stop | 50,-,-,- | true | +| node | disused:public_transport=platform | 50,-,-,- | true | +| node | abandoned:public_transport=platform | 50,-,-,- | true | +| node | removed:public_transport=platform | 50,-,-,- | true | +| node | no:public_transport=platform | 50,-,-,- | true | + +評価点: +* 基礎点 → 50ポイント +* nameがない → 1ポイント +* fixmeがある → 1ポイント +* bus=yesがない → 1ポイント ## 使い方 diff --git a/src/osm/jp/api/Osmdb.java b/src/osm/jp/api/Osmdb.java index 6aa1bf4..eaa94ce 100644 --- a/src/osm/jp/api/Osmdb.java +++ b/src/osm/jp/api/Osmdb.java @@ -429,7 +429,7 @@ score = 1; } if (((point & POINT_BUS_NO) != 0) && !busYes) { - score = 0; + score = 1; } return score; } diff --git a/src/osm/jp/coverage/busstop/DbExistBusstop.java b/src/osm/jp/coverage/busstop/DbExistBusstop.java index 7310997..c5c4836 100644 --- a/src/osm/jp/coverage/busstop/DbExistBusstop.java +++ b/src/osm/jp/coverage/busstop/DbExistBusstop.java @@ -139,10 +139,10 @@ readExistingSub("removed:highway", "bus_stop", POINT_NO); readExistingSub("no:highway", "bus_stop", POINT_NO); - readExistingSub("disused:public_transport", "platform", POINT_BUS_NO); - readExistingSub("abandoned:public_transport", "platform", POINT_BUS_NO); - readExistingSub("removed:public_transport", "platform", POINT_BUS_NO); - readExistingSub("no:public_transport", "platform", POINT_BUS_NO); + readExistingSub("disused:public_transport", "platform", POINT_NO); + readExistingSub("abandoned:public_transport", "platform", POINT_NO); + readExistingSub("removed:public_transport", "platform", POINT_NO); + readExistingSub("no:public_transport", "platform", POINT_NO); } // ノード: 厚木ナイロン (1995040609) 場所: 35.4433312, 139.3932098 public_transport=stop_position,bus=yes @@ -164,19 +164,6 @@ try (Connection osmdb = DatabaseTool.openDb("osmdb")) { String sql = "select osm_id,brand,disused,name,"; - PreparedStatement ps0 = osmdb.prepareStatement( - sql - + "ST_Y(ST_Transform(way,4326)) as lat," - + "ST_X(ST_Transform(way,4326)) as lon" - + " from planet_osm_point " - + "where (highway='disused:bus_stop')" - ); - try (ResultSet rset1 = ps0.executeQuery()) { - while (rset1.next()) { - counter += importExistingNode(osmdb, rset1, 0, removed); - } - } - PreparedStatement ps1 = osmdb.prepareStatement( sql + "ST_Y(ST_Transform(way,4326)) as lat," @@ -190,19 +177,6 @@ } } - PreparedStatement ps = osmdb.prepareStatement( - sql - + "ST_Y(ST_Transform(way,4326)) as lat," - + "ST_X(ST_Transform(way,4326)) as lon" - + " from planet_osm_point " - + "where (public_transport='platform' or public_transport='stop_position')" - ); - try (ResultSet rset1 = ps.executeQuery()) { - while (rset1.next()) { - counter += importExistingNode(osmdb, rset1, point | POINT_BUS_NO, removed); - } - } - PreparedStatement ps2 = osmdb.prepareStatement( sql + "ST_Y(ST_Transform(ST_Centroid(way),4326)) as lat,"